1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 21:48:13 +00:00

ci: fix coverage artifact upload

This commit is contained in:
Martin Milata 2024-09-12 18:25:29 +02:00
parent 2f1ad766d0
commit 884d5b07cf
2 changed files with 21 additions and 36 deletions

View File

@ -0,0 +1,12 @@
name: 'Upload coverage data'
runs:
using: "composite"
steps:
- run: mv core/src/.coverage core/src/.coverage.${{ github.job }}${{ strategy.job-index }} || true
shell: sh
- uses: actions/upload-artifact@v4
with:
name: core-coverage-${{ matrix.model }}-${{ github.job }}-${{ strategy.job-index }}
path: core/src/.coverage.*
retention-days: 7
include-hidden-files: true

View File

@ -284,12 +284,7 @@ jobs:
continue-on-error: true
- uses: ./.github/actions/ui-comment
if: ${{ failure() && env.ACTIONS_DO_UI_TEST == 'true' }}
- uses: actions/upload-artifact@v4
with:
name: core-coverage-${{ matrix.model }}-${{ matrix.lang }}-${{ github.job }}-${{ strategy.job-index }}
# there will be more coverage files (one per core)
path: core/src/.coverage.*
retention-days: 7
- uses: ./.github/actions/upload-coverage
# Click tests - UI.
# See [docs/tests/click-tests](../tests/click-tests.md) for more info.
@ -338,12 +333,8 @@ jobs:
status: ${{ job.status }}
if: always()
continue-on-error: true
- run: mv core/src/.coverage core/.coverage.test_click || true
- uses: actions/upload-artifact@v4
with:
name: core-coverage-${{ matrix.model }}-${{ github.job }}-${{ strategy.job-index }}
path: core/.coverage.*
retention-days: 7
- uses: ./.github/actions/upload-coverage
# Upgrade tests.
# See [docs/tests/upgrade-tests](../tests/upgrade-tests.md) for more info.
@ -414,12 +405,7 @@ jobs:
status: ${{ job.status }}
if: always()
continue-on-error: true
- run: mv core/src/.coverage core/.coverage.test_persistence || true
- uses: actions/upload-artifact@v4
with:
name: core-coverage-${{ matrix.model }}-${{ github.job }}-${{ strategy.job-index }}
path: core/.coverage.*
retention-days: 7
- uses: ./.github/actions/upload-coverage
core_hwi_test:
name: HWI tests
@ -567,12 +553,8 @@ jobs:
core/tests/trezor_monero_tests.log
retention-days: 7
if: always()
- run: mv core/src/.coverage core/.coverage.test_emu_monero || true
- uses: actions/upload-artifact@v4
with:
name: core-coverage-${{ matrix.model }}-${{ github.job }}-${{ strategy.job-index }}
path: core/.coverage.*
retention-days: 7
- uses: ./.github/actions/upload-coverage
# Tests for U2F and HID.
core_u2f_test:
@ -607,12 +589,7 @@ jobs:
path: tests/trezor.log
retention-days: 7
if: always()
- run: mv core/src/.coverage core/.coverage.test_emu_u2f || true
- uses: actions/upload-artifact@v4
with:
name: core-coverage-${{ matrix.model }}-${{ github.job }}-${{ strategy.job-index }}
path: core/.coverage.*
retention-days: 7
- uses: ./.github/actions/upload-coverage
# FIDO2 device tests.
core_fido2_test:
@ -647,12 +624,7 @@ jobs:
tests/trezor.log
retention-days: 7
if: always()
- run: mv core/src/.coverage core/.coverage.test_emu_fido2 || true
- uses: actions/upload-artifact@v4
with:
name: core-coverage-${{ matrix.model }}-${{ github.job }}-${{ strategy.job-index }}
path: core/.coverage.*
retention-days: 7
- uses: ./.github/actions/upload-coverage
core_coverage_report:
name: Coverage report
@ -690,6 +662,7 @@ jobs:
name: core-coverage-report-${{ matrix.model }}
path: core/htmlcov
retention-days: 7
include-hidden-files: true
core_ui_main:
name: UI diff from main branch