diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 09ff7b25..75faf2b6 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -2,20 +2,29 @@ name: Build and Test on: [push, pull_request] jobs: - build: + test: strategy: matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [windows-latest, ubuntu-latest, macOS-latest] + framework: [net6.0, net7.0] + include: + - os: windows-latest + framework: net462 + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 + - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x - - name: Restore dependencies - run: dotnet restore + dotnet-version: | + 6.0.x + 7.0.x + - name: Build - run: dotnet build -c Release --no-restore + run: dotnet build + - name: Test - run: dotnet test -c Release -f net6.0 --no-build --verbosity normal + run: dotnet test -f ${{ matrix.framework }} --no-build --no-restore diff --git a/tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj b/tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj index a5ee4fbd..13b03079 100644 --- a/tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj +++ b/tests/NSubstitute.Acceptance.Specs/NSubstitute.Acceptance.Specs.csproj @@ -1,7 +1,7 @@  - net462;net6.0 + net7.0;net6.0;net462