diff --git a/.deepsource.toml b/.deepsource.toml index fff6a7a5d5..05abe147c1 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -31,3 +31,7 @@ name = "python" [[analyzers]] name = "docker" + +[[analyzers]] +name = "test-coverage" +enabled = true diff --git a/.github/workflows/qc_checks.yaml b/.github/workflows/qc_checks.yaml index 20615eb8b7..1dad674423 100644 --- a/.github/workflows/qc_checks.yaml +++ b/.github/workflows/qc_checks.yaml @@ -195,6 +195,7 @@ jobs: INVENTREE_DB_ENGINE: sqlite3 INVENTREE_PLUGINS_ENABLED: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1 @@ -216,6 +217,14 @@ jobs: uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 # pin@v2.2.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Upload Coverage to Deepsource + if: ${{ github.repository == 'inventree/InvenTree' && github.event_name == 'push' && github.ref == 'refs/heads/master' }} + env: + DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }} + run: | + coverage xml -i + curl -sSL https://deepsource.io/cli | sh + ./bin/deepsource report --analyzer test-coverage --key python --value-file coverage.xml postgres: name: Tests - DB [PostgreSQL] diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 7aaa4b1626..ac9ddd2cd8 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -847,6 +847,7 @@ LANGUAGES = [ ('zh-hant', _('Chinese (Traditional)')), ] + # Testing interface translations if get_boolean_setting('TEST_TRANSLATIONS', default_value=False): # pragma: no cover # Set default language