|
8 | 8 | permissions: |
9 | 9 | contents: write |
10 | 10 |
|
| 11 | +concurrency: |
| 12 | + group: nightly-${{ github.ref }}-${{ github.event_name }} |
| 13 | + cancel-in-progress: false |
| 14 | + |
11 | 15 | jobs: |
12 | 16 | buildmgr: |
13 | 17 | if: github.repository == 'Open-CMSIS-Pack/devtools' |
14 | 18 | uses: ./.github/workflows/buildmgr.yml |
15 | 19 | secrets: inherit |
| 20 | + |
16 | 21 | packchk: |
17 | | - needs: [buildmgr] |
| 22 | + if: github.repository == 'Open-CMSIS-Pack/devtools' |
18 | 23 | uses: ./.github/workflows/packchk.yml |
19 | 24 | secrets: inherit |
| 25 | + |
20 | 26 | packgen: |
21 | | - needs: [packchk] |
| 27 | + if: github.repository == 'Open-CMSIS-Pack/devtools' |
22 | 28 | uses: ./.github/workflows/packgen.yml |
23 | 29 | secrets: inherit |
| 30 | + |
24 | 31 | projmgr: |
25 | | - needs: [packgen] |
| 32 | + if: github.repository == 'Open-CMSIS-Pack/devtools' |
26 | 33 | uses: ./.github/workflows/projmgr.yml |
27 | 34 | secrets: inherit |
| 35 | + |
28 | 36 | svdconv: |
29 | | - needs: [projmgr] |
| 37 | + if: github.repository == 'Open-CMSIS-Pack/devtools' |
30 | 38 | uses: ./.github/workflows/svdconv.yml |
31 | 39 | secrets: inherit |
| 40 | + |
32 | 41 | test_libs: |
33 | | - needs: [svdconv] |
| 42 | + if: github.repository == 'Open-CMSIS-Pack/devtools' |
34 | 43 | uses: ./.github/workflows/test_libs.yml |
| 44 | + secrets: inherit |
| 45 | + |
35 | 46 | coverage: |
| 47 | + if: github.repository == 'Open-CMSIS-Pack/devtools' |
36 | 48 | runs-on: ubuntu-22.04 |
37 | 49 | needs: [ buildmgr, packchk, packgen, projmgr, svdconv, test_libs ] |
| 50 | + |
38 | 51 | steps: |
39 | 52 | - name: Harden Runner |
40 | 53 | if: ${{ !github.event.repository.private }} |
|
45 | 58 | - name: Install dependencies |
46 | 59 | run: | |
47 | 60 | sudo apt-get update |
48 | | - sudo apt-get install \ |
49 | | - lcov |
| 61 | + sudo apt-get install lcov |
50 | 62 |
|
51 | 63 | - name: Download coverage report |
52 | 64 | uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
|
57 | 69 |
|
58 | 70 | - name: Consolidate coverage data |
59 | 71 | run: | |
60 | | - lcov --rc lcov_branch_coverage=1 --add-tracefile coverage_packchk.info -a coverage_packgen.info -a coverage_projmgr.info -a coverage_buildmgr.info -a coverage_svdconv.info -o merged_coverage.info |
| 72 | + lcov --rc lcov_branch_coverage=1 \ |
| 73 | + --add-tracefile coverage_packchk.info \ |
| 74 | + -a coverage_packgen.info \ |
| 75 | + -a coverage_projmgr.info \ |
| 76 | + -a coverage_buildmgr.info \ |
| 77 | + -a coverage_svdconv.info \ |
| 78 | + -o merged_coverage.info |
61 | 79 | working-directory: coverage/ |
62 | 80 |
|
63 | 81 | - name: Archive merged coverage report |
|
66 | 84 | name: merged-coverage-report |
67 | 85 | path: ./coverage/merged_coverage.info |
68 | 86 | if-no-files-found: error |
| 87 | + |
| 88 | + publish-test-results: |
| 89 | + if: always() && github.repository == 'Open-CMSIS-Pack/devtools' |
| 90 | + name: Publish Test Results |
| 91 | + runs-on: ubuntu-22.04 |
| 92 | + needs: [ buildmgr, packchk, packgen, projmgr, svdconv, test_libs ] |
| 93 | + permissions: |
| 94 | + checks: write |
| 95 | + pull-requests: write |
| 96 | + steps: |
| 97 | + - name: Harden Runner |
| 98 | + if: ${{ !github.event.repository.private }} |
| 99 | + uses: step-security/harden-runner@6c3c2f2c1c457b00c10c4848d6f5491db3b629df # v2.18.0 |
| 100 | + with: |
| 101 | + egress-policy: audit |
| 102 | + |
| 103 | + - name: Download and Extract Artifacts |
| 104 | + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 |
| 105 | + with: |
| 106 | + path: artifacts |
| 107 | + |
| 108 | + - name: Publish Test Results |
| 109 | + uses: EnricoMi/publish-unit-test-result-action@c950f6fb443cb5af20a377fd0dfaa78838901040 # v2.23.0 |
| 110 | + with: |
| 111 | + commit: ${{ github.sha }} |
| 112 | + report_individual_runs: true |
| 113 | + files: "artifacts/**/*.xml" |
0 commit comments