Skip to content

Commit b9fe9ae

Browse files
committed
Use a strategy matrix to run the Debug and Release build+test combinations in parallel.
1 parent 111b757 commit b9fe9ae

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/dotnetcore.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Build and Test
22
on: [push, pull_request]
33
jobs:
44
Build_and_Test:
5+
strategy:
6+
matrix:
7+
# Debug and Release might be different due to conditional compilation, so validate both.
8+
configuration: [Debug, Release]
9+
name: Build and Test (${{ matrix.configuration }})
510
runs-on: ubuntu-latest
611
steps:
712
- name: Checkout
@@ -12,12 +17,7 @@ jobs:
1217
dotnet-version: 10.0.x
1318
- name: Restore Dependencies
1419
run: dotnet restore
15-
# Debug and Release might be different due to conditional compilation, so validate both.
16-
- name: Build (Debug)
17-
run: dotnet build --configuration Debug --no-restore
18-
- name: Build (Release)
19-
run: dotnet build --configuration Release --no-restore
20-
- name: Test (Debug)
21-
run: dotnet test --configuration Debug --no-build --nologo
22-
- name: Test (Release)
23-
run: dotnet test --configuration Release --no-build --nologo
20+
- name: Build
21+
run: dotnet build --configuration ${{ matrix.configuration }} --no-restore
22+
- name: Test
23+
run: dotnet test --configuration ${{ matrix.configuration }} --no-build --nologo

0 commit comments

Comments
 (0)