From 9a3540cd92dabeda02b5eec4d9a94e93a2240af5 Mon Sep 17 00:00:00 2001 From: Romfos Date: Tue, 10 Oct 2023 05:59:21 +0300 Subject: [PATCH] [Github] Run unit tests for all test platforms (#742) * Run unit tests for all test platforms * Update build_and_test.yml --- .github/workflows/build_and_test.yml | 25 +++++++++++++------ .../NSubstitute.Acceptance.Specs.csproj | 2 +- 2 files changed, 18 insertions(+), 9 deletions(-) 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