Skip to content

Commit

Permalink
ci: fix coverage artifact upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilata committed Sep 12, 2024
1 parent e7e2faf commit 985dd44
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 36 deletions.
12 changes: 12 additions & 0 deletions .github/actions/upload-coverage/action.yml
Original file line number Diff line number Diff line change
@@ -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
45 changes: 9 additions & 36 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 985dd44

Please sign in to comment.