Skip to content

Commit 91ff83c

Browse files
Upload test reports to Codecov
1 parent b3915b7 commit 91ff83c

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/_test.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ jobs:
5454
run: python -m pip install --user . -r requirements-dev.txt
5555

5656
- name: Run unit tests
57-
run: pytest -vv --retries 1 -n auto --cov --cov-report=xml tests
57+
run: >
58+
pytest -vv --retries 1 -n auto --cov --cov-report=xml
59+
--junitxml=junit-unittests.xml -o junit_family=legacy tests
5860
5961
- name: Upload coverage to Codecov
6062
if: |
@@ -69,5 +71,23 @@ jobs:
6971
env_vars: OS,PYTHON
7072
fail_ci_if_error: true
7173
flags: unittests
74+
report_type: coverage
75+
name: codecov-umbrella
76+
verbose: true
77+
78+
- name: Upload test results to Codecov
79+
if: |
80+
inputs.os == 'ubuntu-latest'
81+
&& inputs.python-version == '3.11'
82+
&& github.actor == 'btschwertfeger'
83+
&& (github.event_name == 'push' || github.event_name == 'release')
84+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
85+
with:
86+
token: ${{ secrets.CODECOV_TOKEN }}
87+
files: junit-unittests.xml
88+
env_vars: OS,PYTHON
89+
fail_ci_if_error: true
90+
flags: unittests
91+
report_type: test_results
7292
name: codecov-umbrella
7393
verbose: true

0 commit comments

Comments
 (0)