Skip to content

Commit cef3c4f

Browse files
committed
ci: enhance test workflow to upload JUnit results to Codecov
Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent eea6880 commit cef3c4f

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/pytest_mpflash.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,26 @@ jobs:
7373
run: |
7474
# run once to bootstrap database (test hack)
7575
uv run mpflash download --board RPI_PICO
76-
uv run pytest --cov --cov-branch --cov-report=xml
76+
uv run pytest --cov --cov-branch --cov-report=xml --junitxml=results/junit.xml -o junit_family=legacy
7777
7878
#----------------------------------------------
7979
# upload coverage stats
8080
# .XML to Codecov
8181
#----------------------------------------------
8282

8383
- name: Upload coverage-mpflash-*.xml to Codecov
84-
if: always() # ignore errors
84+
if: ${{ !cancelled() }}
8585
continue-on-error: true
8686
uses: codecov/codecov-action@v7
8787
with:
88-
token: ${{ secrets.CODECOV_TOKEN }}
89-
fail_ci_if_error: false
90-
# file: results/coverage-mpflash-${{ matrix.python-version }}-${{ matrix.os }}.xml
91-
# flags: mpflash
88+
token: ${{ secrets.CODECOV_TOKEN }}
89+
fail_ci_if_error: false
9290

91+
- name: Upload test results to Codecov
92+
if: ${{ !cancelled() }}
93+
uses: codecov/test-results-action@v1
94+
with:
95+
token: ${{ secrets.CODECOV_TOKEN }}
96+
files: results/junit.xml
97+
fail_ci_if_error: false
9398

0 commit comments

Comments
 (0)