Skip to content

Commit

Permalink
Add matrix strategy for .NET frameworks in CI
Browse files Browse the repository at this point in the history
Introduce matrix strategy in `ci.yml` for `build-and-test` job to support `net6.0-windows` and `net8.0-windows`. Update `dotnet restore` to target `Bravo.sln`. Modify `dotnet build` and `dotnet test` steps to use framework from matrix.
  • Loading branch information
albertospelta committed Dec 6, 2024
1 parent a7d9f77 commit 5fbeabe
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ on:
jobs:
build-and-test:
runs-on: windows-latest
strategy:
matrix:
framework: [net6.0-windows, net8.0-windows]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
- name: checkout
uses: actions/checkout@v4
- name: setup dotnet
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: dotnet restore
run: dotnet restore
run: dotnet restore Bravo.sln
- name: dotnet build
run: dotnet build Bravo.sln --configuration Release --no-restore
run: dotnet build Bravo.sln --configuration Release --framework ${{ matrix.framework }} --no-restore
- name: dotnet test
run: dotnet test Bravo.sln --configuration Release --no-build --verbosity normal
run: dotnet test Bravo.sln --configuration Release --framework ${{ matrix.framework }} --no-build --verbosity normal

0 comments on commit 5fbeabe

Please sign in to comment.