Skip to content

Commit 30d4278

Browse files
authored
Merge pull request #281 from geotribu/tooling/fix-codecov-config
Tooling: fix and update codecov config
2 parents 6975af5 + fcba098 commit 30d4278

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

.github/workflows/tester.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,21 @@ jobs:
4444
python -m pip install -U -r requirements/testing.txt
4545
4646
- name: Run Unit tests
47-
run: pytest -p no:qgis tests/unit/
47+
run: pytest -p no:qgis tests/unit/ -o junit_family=legacy --junitxml=junit.xml
48+
49+
- name: Upload test results to Codecov
50+
if: ${{ !cancelled() }}
51+
uses: codecov/test-results-action@v1
52+
with:
53+
token: ${{ secrets.CODECOV_TOKEN }}
4854

4955
- name: Upload coverage to Codecov
5056
uses: codecov/codecov-action@v5
5157
with:
52-
env_vars: PYTHON
58+
env_vars: PYTHON_VERSION
5359
flags: unittests
5460
name: Code Coverage for unittests on Ubuntu.python-${{ env.PYTHON_VERSION }}]
61+
token: ${{ secrets.CODECOV_TOKEN }}
5562

5663
test-qgis:
5764
runs-on: ubuntu-latest
@@ -89,7 +96,12 @@ jobs:
8996
python3 -m pip install -U -r requirements/testing.txt
9097
9198
- name: Run Unit tests
92-
run: pytest tests/qgis --junitxml=junit/test-results-qgis.xml --cov-report=xml:coverage-reports/coverage-qgis.xml
99+
run: pytest tests/qgis -o junit_family=legacy --junitxml=junit.xml
93100

94101
- name: Upload coverage to Codecov
95102
uses: codecov/codecov-action@v5
103+
with:
104+
env_vars: PYTHON_VERSION
105+
flags: qgis-tests
106+
name: Code Coverage for QGIS tests
107+
token: ${{ secrets.CODECOV_TOKEN }}

setup.cfg

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,16 @@ addopts =
5252
--junitxml=junit/test-results.xml
5353
--cov-config=setup.cfg
5454
--cov=qtribu
55-
--cov-report=xml
5655
--cov-report=html
56+
--cov-report=term
57+
--cov-report=xml
5758
--ignore=tests/_wip/
5859
norecursedirs = .* build dev development dist docs CVS fixtures _darcs {arch} *.egg venv _wip
5960
python_files = test_*.py
6061
testpaths = tests
6162

6263
[coverage:run]
6364
branch = True
64-
include =
65-
qtribu/*
6665
omit =
6766
.venv/*
6867
tests/*
@@ -75,4 +74,6 @@ exclude_lines =
7574
if __name__ == .__main__.:
7675

7776
ignore_errors = True
77+
omit =
78+
qtribu/gui/**/*.py
7879
show_missing = True

0 commit comments

Comments
 (0)