Skip to content

Commit

Permalink
fix: matrix build
Browse files Browse the repository at this point in the history
  • Loading branch information
warnyul committed Jul 31, 2024
1 parent 6c6679f commit 04938bd
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
build:
strategy:
matrix:
os: [{ name: ubuntu-22.04, key: ubuntu }, { name: windows-2022, key: windows }]
runs-on: ${{ matrix.os.name }}
os: [ubuntu-22.04, windows-2022]
runs-on: ${{ matrix.os }}
permissions:
actions: write
contents: read
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Upload unit test report
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: ${{ matrix.os.key }}-unit-test-report
name: ${{ matrix.os }}-unit-test-report
path: |
${{ github.workspace }}/**/build/reports/tests
${{ github.workspace }}/**/build/test-results
Expand All @@ -72,7 +72,7 @@ jobs:
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
if: ${{ hashFiles('build/reports/kover/report.xml') != '' }}
with:
name: ${{ matrix.os.key }}-kover-report
name: ${{ matrix.os }}-kover-report
path: ${{ github.workspace }}/build/reports/kover/report.xml
retention-days: 5
release:
Expand All @@ -97,7 +97,10 @@ jobs:
GIT_USER_EMAIL: ${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
junit:
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022 ]
runs-on: ${{ matrix.os }}
needs:
- build
permissions:
Expand All @@ -109,14 +112,18 @@ jobs:
- name: Download unit test report
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: ubuntu-unit-test-report
name: ${{ matrix.os }}-unit-test-report
- name: Comment unit test report
if: ${{ hashFiles('**/test-results/**/*.xml') != '' }}
uses: mikepenz/action-junit-report@db71d41eb79864e25ab0337e395c352e84523afe # v4.3.1
with:
report_paths: '**/test-results/**/*.xml'
check_name: Unit test report (${{ matrix.os }})
kover:
runs-on: ubuntu-22.04
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022 ]
runs-on: ${{ matrix.os }}
needs:
- build
permissions:
Expand All @@ -129,18 +136,18 @@ jobs:
- name: Download coverage report
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ubuntu-kover-report
name: ${{ matrix.os }}-kover-report
- name: Comment branch coverage report to PR
uses: mi-kas/kover-report@5f58465b6f395c8fa3adc2665e27250bad87de50 # v1.9
if: ${{ hashFiles('report.xml') != '' }}
with:
path: ${{ github.workspace }}/report.xml
title: Branch Coverage
title: Branch Coverage (${{ matrix.os }})
update-comment: true
min-coverage-overall: 60
min-coverage-changed-files: 70
coverage-counter-type: BRANCH
- name: Comment line coverage report to PR
- name: Comment line coverage report to PR (${{ matrix.os }})
uses: mi-kas/kover-report@5f58465b6f395c8fa3adc2665e27250bad87de50 # v1.9
if: ${{ hashFiles('report.xml') != '' }}
with:
Expand Down

0 comments on commit 04938bd

Please sign in to comment.