1919 required : false
2020 type : string
2121 os-list :
22- default : ' [ "windows-latest", "ubuntu-22.04" ]'
23- required : false
24- type : string
25- tfm-list :
26- default : ' [ "net462", "net8.0", "net9.0" ]'
22+ default : ' [ "windows-latest", "ubuntu-22.04", "macos-latest" ]'
2723 required : false
2824 type : string
2925 test-case-filter :
@@ -41,19 +37,13 @@ jobs:
4137 fail-fast : false # ensures the entire test matrix is run, even if one permutation fails
4238 matrix :
4339 os : ${{ fromJSON(inputs.os-list) }}
44- version : ${{ fromJSON(inputs.tfm-list) }}
45- exclude :
46- - os : ubuntu-22.04
47- version : net462
48- - os : macos-latest
49- version : net462
5040
5141 runs-on : ${{ matrix.os }}
5242
5343 defaults :
5444 run :
5545 shell : bash
56- working-directory : ' ${{ inputs.module-directory }}'
46+ working-directory : ' ./ ${{ inputs.module-directory }}'
5747
5848 steps :
5949 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -63,15 +53,13 @@ jobs:
6353 # retrieve them all.
6454 fetch-depth : 0
6555
66- - name : Setup previous .NET runtimes
56+ - name : Setup .NET runtimes
6757 uses : actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
6858 with :
59+ global-json-file : global.json
6960 dotnet-version : |
7061 8.0.x
7162
72- - name : Setup .NET
73- uses : actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
74-
7563 - name : dotnet restore ${{ inputs.module-name }}
7664 run : dotnet restore -p:EnablePackageValidation=true
7765
9179 dotnet test
9280 --collect:"Code Coverage;Format=cobertura"
9381 --results-directory:TestResults
94- --framework ${{ matrix.version }}
9582 --configuration Release
9683 --no-restore
9784 --no-build
@@ -107,14 +94,13 @@ jobs:
10794 continue-on-error : true # Note: Don't fail for upload failures
10895 env :
10996 OS : ${{ matrix.os }}
110- TFM : ${{ matrix.version }}
11197 FILTER : ${{ inputs.test-case-filter }}
11298 token : ${{ secrets.CODECOV_TOKEN }}
11399 with :
114100 files : ' **/TestResults/**/*Cobertura.xml'
115- env_vars : OS,TFM, FILTER
101+ env_vars : OS,FILTER
116102 flags : ${{ inputs.code-cov-prefix }}-${{ inputs.module-name }}
117- name : Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.module-name }} on [${{ matrix.os }}.${{ matrix.version }} ]
103+ name : Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.module-name }} on [${{ matrix.os }}]
118104 codecov_yml_path : .github/codecov.yml
119105
120106 - name : Upload test results ${{ inputs.code-cov-prefix }}-${{ inputs.module-name }}
@@ -124,5 +110,5 @@ jobs:
124110 files : ' **/TestResults/junit.xml'
125111 env_vars : OS,TFM,FILTER
126112 flags : ${{ inputs.code-cov-prefix }}-${{ inputs.module-name }}
127- name : Test results for ${{ inputs.code-cov-prefix }}-${{ inputs.module-name }} on [${{ matrix.os }}.${{ matrix.version }} ]
113+ name : Test results for ${{ inputs.code-cov-prefix }}-${{ inputs.module-name }} on [${{ matrix.os }}]
128114 token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments