Skip to content

Commit 8755a6f

Browse files
committed
Run CI on multiple dotnet versions on different os
1 parent 066723e commit 8755a6f

1 file changed

Lines changed: 9 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,20 @@ on:
99
- main
1010

1111
jobs:
12-
linux:
13-
runs-on: ubuntu-latest
12+
CI:
13+
strategy:
14+
matrix:
15+
os: [macos-latest, windows-latest, ubuntu-latest]
16+
dotnet: ['2.1.x', '3.1.x', '5.0.x', '6.0.x']
17+
runs-on: ${{ matrix.os }}
18+
name: CI on ${{ matrix.os }} using dotnet ${{ matrix.dotnet }}
1419
steps:
1520
- uses: actions/checkout@v1
1621
- name: Setup .NET Core
1722
uses: actions/setup-dotnet@v1
1823
with:
19-
dotnet-version: "6.0.x"
24+
dotnet-version: ${{ matrix.dotnet }}
2025
- name: Build with dotnet
2126
run: dotnet build --configuration Release
2227
- name: Test with dotnet
23-
run: dotnet test --configuration Release
24-
windows:
25-
runs-on: windows-latest
26-
steps:
27-
- uses: actions/checkout@v1
28-
- name: Setup .NET Core
29-
uses: actions/setup-dotnet@v1
30-
with:
31-
dotnet-version: "6.0.x"
32-
- name: Build with dotnet
33-
run: dotnet build --configuration Release
34-
- name: Test with dotnet
35-
run: dotnet test --configuration Release
28+
run: dotnet test --configuration Release

0 commit comments

Comments
 (0)