Skip to content

Commit 1fcd252

Browse files
committed
Combine all coverage before uploading to Codecov
1 parent aa80eae commit 1fcd252

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,13 @@ jobs:
7575
run: |
7676
mkdir reports/
7777
pip install -e . --no-build-isolation
78-
coverage run -m pytest --reruns 5 -m ${{ matrix.mark }}
79-
80-
- name: Combine coverage
81-
run: |
82-
coverage combine
83-
coverage xml -o reports/coverage-${{ matrix.python-version }}.xml -i
78+
coverage run -m pytest -m ${{ matrix.mark }}
8479
8580
- name: Upload coverage results
8681
uses: actions/upload-artifact@v3
8782
with:
8883
name: code-coverage-${{ matrix.python-version }}
89-
path: reports/coverage-${{ matrix.python-version }}.xml
84+
path: reports/.coverage*
9085

9186
all_done:
9287
name: Tests done
@@ -105,6 +100,11 @@ jobs:
105100
- name: Move coverage reports to the root folder
106101
run: find reports -type f -exec mv '{}' reports \;
107102

103+
- name: Combine coverage
104+
run: |
105+
coverage combine
106+
coverage xml -o reports/coverage.xml -i
107+
108108
- name: Check coverage
109109
uses: codecov/codecov-action@v3
110110
with:

0 commit comments

Comments
 (0)