mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
Add deepsource code coverage (#5717)
* added deepsource coverage settings * Ignore missing coverage * trigger full CI run * only run when upstream, master and push
This commit is contained in:
parent
5d6d847328
commit
7ff3f99dc9
@ -31,3 +31,7 @@ name = "python"
|
|||||||
|
|
||||||
[[analyzers]]
|
[[analyzers]]
|
||||||
name = "docker"
|
name = "docker"
|
||||||
|
|
||||||
|
[[analyzers]]
|
||||||
|
name = "test-coverage"
|
||||||
|
enabled = true
|
||||||
|
9
.github/workflows/qc_checks.yaml
vendored
9
.github/workflows/qc_checks.yaml
vendored
@ -195,6 +195,7 @@ jobs:
|
|||||||
INVENTREE_DB_ENGINE: sqlite3
|
INVENTREE_DB_ENGINE: sqlite3
|
||||||
INVENTREE_PLUGINS_ENABLED: true
|
INVENTREE_PLUGINS_ENABLED: true
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4.1.1
|
||||||
@ -216,6 +217,14 @@ jobs:
|
|||||||
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 # pin@v2.2.3
|
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 # pin@v2.2.3
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
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:
|
postgres:
|
||||||
name: Tests - DB [PostgreSQL]
|
name: Tests - DB [PostgreSQL]
|
||||||
|
@ -847,6 +847,7 @@ LANGUAGES = [
|
|||||||
('zh-hant', _('Chinese (Traditional)')),
|
('zh-hant', _('Chinese (Traditional)')),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
# Testing interface translations
|
# Testing interface translations
|
||||||
if get_boolean_setting('TEST_TRANSLATIONS', default_value=False): # pragma: no cover
|
if get_boolean_setting('TEST_TRANSLATIONS', default_value=False): # pragma: no cover
|
||||||
# Set default language
|
# Set default language
|
||||||
|
Loading…
x
Reference in New Issue
Block a user