Skip to content

Commit dafa648

Browse files
author
github-actions
committed
fix: Follow Codecov documentation for test analytics
Separate coverage and test results uploads as recommended: - Use codecov-action@v5 for coverage - Use test-results-action@v1 for test results - Add junit_family=legacy option to pytest command - Remove explicit file parameter from test-results-action
1 parent ded3b97 commit dafa648

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/tests.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,19 @@ jobs:
6262
run: uv sync --group dev --all-extras
6363

6464
- name: Run tests
65-
run: uv run pytest tests/ -v --tb=short --cov=src/ryandata_address_utils --cov-report=xml --cov-report=term --junitxml=junit.xml
65+
run: uv run pytest tests/ --cov --junitxml=junit.xml -o junit_family=legacy --cov=src/ryandata_address_utils --cov-report=xml --cov-report=term
6666

67-
- name: Upload coverage and test results to Codecov
68-
uses: codecov/codecov-action@v4
67+
- name: Upload coverage to Codecov
68+
uses: codecov/codecov-action@v5
6969
with:
7070
token: ${{ secrets.CODECOV_TOKEN }}
71-
file: ./coverage.xml,./junit.xml
71+
file: ./coverage.xml
7272
flags: unittests
7373
name: codecov-umbrella
7474
fail_ci_if_error: false
75+
76+
- name: Upload test results to Codecov
77+
if: ${{ !cancelled() }}
78+
uses: codecov/test-results-action@v1
79+
with:
80+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)