Skip to content

Commit a13f7bb

Browse files
Upload test coverage even if tests fail (#1751)
Signed-off-by: Jean-Christophe Morin <[email protected]>
1 parent d46901c commit a13f7bb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,15 @@ jobs:
8989
run: rez-python -m pip install pytest-cov parameterized
9090

9191
- name: Run tests
92+
id: tests
9293
run: rez-selftest -v -- --cov=rez --cov-report=xml:coverage.xml
9394
env:
9495
_REZ_ENSURE_TEST_SHELLS: ${{ matrix.shells }}
9596

9697
- name: Upload coverage reports to Codecov
9798
uses: codecov/codecov-action@v4
99+
# Run on both success and failure, but only if coverage.xml exists.
100+
if: ${{ hashFiles('coverage.xml') != '' && (steps.tests.outcome == 'success' || steps.tests.outcome == 'failure') }}
98101
with:
99102
slug: AcademySoftwareFoundation/rez
100103
files: 'coverage.xml'

0 commit comments

Comments
 (0)