Skip to content

Commit c38eaad

Browse files
committed
Update codecov tests config
1 parent 14af95c commit c38eaad

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/codecov.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,21 @@ jobs:
4343
fi
4444
4545
- shell: bash -el {0}
46-
name: Test with pytest and collect coverage
46+
name: Test with pytest and Output a JUnit XML
4747
run: |
48-
pytest --cov=./ --cov-report=xml
48+
pytest --cov=./ --junitxml=junit.xml -o junit_family=legacy
4949
5050
- name: Upload coverage to Codecov
5151
uses: codecov/codecov-action@v3
5252
env:
5353
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5454

55+
- name: Upload test results to Codecov
56+
if: ${{ !cancelled() }}
57+
uses: codecov/test-results-action@v1
58+
with:
59+
token: ${{ secrets.CODECOV_TOKEN }}
60+
5561
- name: Check secret presence
5662
id: check_secret
5763
run: |
@@ -60,6 +66,11 @@ jobs:
6066
echo "is_set=true" >> $GITHUB_OUTPUT
6167
fi
6268
69+
- shell: bash -el {0}
70+
name: Test with pytest and collect coverage
71+
run: |
72+
pytest --cov=./ --cov-report=xml
73+
6374
- name: Upload coverage to Codacy
6475
if: steps.check_secret.outputs.is_set == 'true'
6576
uses: codacy/[email protected]

0 commit comments

Comments
 (0)