Skip to content

Commit a49a24b

Browse files
author
Jose A. Fernandez
committed
Update CI workflow for .NET on Windows and simplify the strategy matrix.
1 parent e9e9af7 commit a49a24b

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

.github/workflows/dotnet-core.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI-NETCore
1+
name: CI
22

33
on:
44
push:
@@ -7,22 +7,25 @@ on:
77
branches: [ master, develop ]
88

99
jobs:
10-
build:
11-
12-
runs-on: ubuntu-latest
13-
10+
build-and-test:
11+
runs-on: windows-latest
12+
strategy:
13+
matrix:
14+
test-framework: [ 'net8.0', 'net9.0', 'net48', 'net481' ]
1415
steps:
15-
- uses: actions/checkout@v2
16-
- name: Setup .NET Core
17-
uses: actions/setup-dotnet@v1
18-
with:
19-
dotnet-version: 3.1.404
20-
- name: Install dependencies
21-
working-directory: src
22-
run: dotnet restore
23-
- name: Build
24-
working-directory: src
25-
run: dotnet build --configuration Release --no-restore
26-
- name: Test
27-
working-directory: src
28-
run: dotnet test --no-restore --verbosity normal
16+
- uses: actions/checkout@v2
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: |
21+
8.0.x
22+
9.0.x
23+
- name: Install dependencies
24+
working-directory: src
25+
run: dotnet restore
26+
- name: Build
27+
working-directory: src
28+
run: dotnet build --configuration Release --no-restore
29+
- name: Test
30+
working-directory: src
31+
run: dotnet test --no-restore --verbosity normal --framework ${{ matrix.test-framework }}

src/.github/workflows/dotnet-core.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ on:
77
branches: [ master, develop ]
88

99
jobs:
10-
build-and-test:
10+
build-and-test:
1111
runs-on: windows-latest
1212
strategy:
1313
matrix:
1414
test-framework: [ 'net8.0', 'net9.0', 'net48', 'net481' ]
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Setup .NET
18-
uses: actions/setup-dotnet@v3
18+
uses: actions/setup-dotnet@v4
1919
with:
2020
dotnet-version: |
2121
8.0.x

0 commit comments

Comments
 (0)