File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : CI
1+ name : PR Tests - Linux
22
33on :
44 pull_request :
55 branches : [ main ]
66
7-
87jobs :
98 build :
109 runs-on : ubuntu-latest
1110 strategy :
1211 matrix :
13- dotnet-version : [6.0, 7.0, 8.0, 9.0]
12+ include :
13+ - dotnet-version : 6.0
14+ tfm : net6.0
15+ - dotnet-version : 7.0
16+ tfm : net7.0
17+ - dotnet-version : 8.0
18+ tfm : net8.0
19+ - dotnet-version : 9.0
20+ tfm : net9.0
1421 steps :
1522 - name : Checkout repository
1623 uses : actions/checkout@v4
2027 with :
2128 dotnet-version : ${{ matrix.dotnet-version }}
2229
23- - name : Run tests
30+ - name : Restore (test project only, pinned TF)
31+ run : |
32+ echo "Restoring test project for framework ${{ matrix.tfm }}"
33+ dotnet restore ./cas-dotnet-sdk-tests/cas-dotnet-sdk-tests.csproj --framework ${{ matrix.tfm }}
34+
35+ - name : Build (override framework)
2436 run : |
25- # Run tests that target the runtime matching the SDK where possible.
26- # Most test projects will run fine with the installed SDK.
27- dotnet test ./cas-dotnet-sdk-tests/cas-dotnet-sdk-tests.csproj -c Release --logger "trx"
37+ echo "Building solution for framework ${{ matrix.tfm }}"
38+ dotnet build ./cas-dotnet-sdk.sln -c Release --no-restore -f ${{ matrix.tfm }}
39+
40+ - name : Run tests (override framework)
41+ run : |
42+ echo "Running tests for framework ${{ matrix.tfm }}"
43+ dotnet test ./cas-dotnet-sdk-tests/cas-dotnet-sdk-tests.csproj -c Release --no-build -f ${{ matrix.tfm }} --logger "trx"
44+
45+ - name : Upload test results
46+ if : always()
47+ uses : actions/upload-artifact@v4
48+ with :
49+ name : TestResults-dotnet-${{ matrix.dotnet-version }}
50+ path : |
51+ **/TestResults/*.trx
52+ **/*.trx
Original file line number Diff line number Diff line change 1- name : CI
1+ name : PR Tests - Windows
22
33on :
44 pull_request :
55 branches : [ main ]
66
7-
87jobs :
98 build :
10- runs-on : windows -latest
9+ runs-on : ubuntu -latest
1110 strategy :
1211 matrix :
13- dotnet-version : [6.0, 7.0, 8.0, 9.0]
12+ include :
13+ - dotnet-version : 6.0
14+ tfm : net6.0
15+ - dotnet-version : 7.0
16+ tfm : net7.0
17+ - dotnet-version : 8.0
18+ tfm : net8.0
19+ - dotnet-version : 9.0
20+ tfm : net9.0
1421 steps :
1522 - name : Checkout repository
1623 uses : actions/checkout@v4
2027 with :
2128 dotnet-version : ${{ matrix.dotnet-version }}
2229
23- - name : Run tests
30+ - name : Restore (test project only, pinned TF)
31+ run : |
32+ echo "Restoring test project for framework ${{ matrix.tfm }}"
33+ dotnet restore ./cas-dotnet-sdk-tests/cas-dotnet-sdk-tests.csproj --framework ${{ matrix.tfm }}
34+
35+ - name : Build (override framework)
2436 run : |
25- # Run tests that target the runtime matching the SDK where possible.
26- # Most test projects will run fine with the installed SDK.
27- dotnet test ./cas-dotnet-sdk-tests/cas-dotnet-sdk-tests.csproj -c Release --logger "trx"
37+ echo "Building solution for framework ${{ matrix.tfm }}"
38+ dotnet build ./cas-dotnet-sdk.sln -c Release --no-restore -f ${{ matrix.tfm }}
39+
40+ - name : Run tests (override framework)
41+ run : |
42+ echo "Running tests for framework ${{ matrix.tfm }}"
43+ dotnet test ./cas-dotnet-sdk-tests/cas-dotnet-sdk-tests.csproj -c Release --no-build -f ${{ matrix.tfm }} --logger "trx"
44+
45+ - name : Upload test results
46+ if : always()
47+ uses : actions/upload-artifact@v4
48+ with :
49+ name : TestResults-dotnet-${{ matrix.dotnet-version }}
50+ path : |
51+ **/TestResults/*.trx
52+ **/*.trx
You can’t perform that action at this time.
0 commit comments