Skip to content

Commit

Permalink
ci: fix JSONDecodeError when combining .coverage.gw* files
Browse files Browse the repository at this point in the history
For example: https://github.com/trezor/trezor-firmware/actions/runs/12976369614/job/36188913357

Single `.coverage` files were renamed, but `make test_emu_ui_multicore` generates
multiple `.coverage.gw*` files, which may overwrite each other in case there are
multiple similar CI jobs (e.g. when translation-related jobs are enabled).

[no changelog]
  • Loading branch information
romanz committed Jan 30, 2025
1 parent 5cdd0e7 commit b2d3a0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/actions/upload-coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ name: 'Upload coverage data'
runs:
using: "composite"
steps:
- run: mv core/src/.coverage core/src/.coverage.${{ github.job }}${{ strategy.job-index }} || true
# add per-job suffix so the .coverage files won't be overwritten during merge (by `core_coverage_report`)
- run: |
for F in core/src/.coverage core/src/.coverage.gw*
do
mv -v $F $F.${{ github.job }}${{ strategy.job-index }} || true
done
shell: sh
- uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit b2d3a0c

Please sign in to comment.