Skip to content

Commit 0e0d1aa

Browse files
authored
Use version matrix for build (#40)
* Use version matrix for build * Fix build * Fix build
1 parent e17ba44 commit 0e0d1aa

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/dotnet-test.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,31 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

16+
strategy:
17+
matrix:
18+
dotnet: [
19+
{ tfm: net8.0, version: 8.0.x },
20+
{ tfm: net9.0, version: 9.0.x },
21+
]
22+
1723
steps:
1824
- uses: actions/checkout@v4
1925

20-
- name: Setup .NET 8.0
21-
uses: actions/setup-dotnet@v4
22-
with:
23-
dotnet-version: 8.0.x
24-
25-
- name: Setup .NET 9.0
26+
- name: Setup .NET 9.0 # Latest dotnet version supported
2627
uses: actions/setup-dotnet@v4
2728
with:
2829
dotnet-version: 9.0.x
2930

31+
- name: Display dotnet version
32+
run: dotnet --version
33+
3034
- name: Restore dependencies
3135
run: dotnet restore
3236

3337
- name: Build
34-
run: dotnet build --no-restore
38+
run: dotnet build --no-restore --framework ${{ matrix.dotnet.tfm }}
3539

3640
- name: Test
37-
run: dotnet test --no-build --verbosity normal
41+
run: dotnet test --no-build --verbosity normal --framework ${{ matrix.dotnet.tfm }}

0 commit comments

Comments
 (0)