Skip to content

Commit 6698cb2

Browse files
committed
Fix Codecov upload - specify explicit coverage source and file paths
1 parent c03ac47 commit 6698cb2

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,19 @@ jobs:
3030

3131
- name: Test with pytest
3232
run: |
33-
uv run pytest --cov --cov-report=xml --junitxml=junit.xml
33+
uv run pytest --cov=src/abstract_validation_base --cov-report=xml:coverage.xml --junitxml=junit.xml
3434
3535
- name: Upload coverage to Codecov
3636
uses: codecov/codecov-action@v5
3737
with:
3838
token: ${{ secrets.CODECOV_TOKEN }}
39+
files: ./coverage.xml
40+
fail_ci_if_error: true
41+
verbose: true
3942

4043
- name: Upload test results to Codecov
4144
if: ${{ !cancelled() }}
4245
uses: codecov/test-results-action@v1
4346
with:
4447
token: ${{ secrets.CODECOV_TOKEN }}
48+
files: ./junit.xml

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Thumbs.db
2323
.hypothesis/
2424
.pytest_cache/
2525
.coverage
26+
coverage.xml
27+
junit.xml
2628
htmlcov/
2729

2830
# Data cache

0 commit comments

Comments
 (0)