diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 433f5d2..bc7b024 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -64,7 +64,7 @@ jobs: ${{ env.NuGetDirectory }}/*.snupkg run_test: - name: test-${{ matrix.os }}-${{ matrix.test-framework }} + name: test-${{ matrix.os }} runs-on: ${{ matrix.os }} env: configuration: Release @@ -72,47 +72,20 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-20.04, macos-latest] - test-framework: [net6.0, net7.0] - include: - - os: ubuntu-20.04 - test-framework: net6.0 - installSnap7: true - dotnet-sdk: '6.x' - - os: ubuntu-20.04 - test-framework: net7.0 - installSnap7: true - dotnet-sdk: '7.x' - - os: macos-latest - test-framework: net6.0 - installSnap7: true - dotnet-sdk: '6.x' - - os: macos-latest - test-framework: net7.0 - installSnap7: true - dotnet-sdk: '7.x' - - os: windows-latest - test-framework: net6.0 - dotnet-sdk: '6.x' - - os: windows-latest - test-framework: net7.0 - dotnet-sdk: '7.x' - - os: windows-latest - test-framework: net462 - dotnet-sdk: '7.x' fail-fast: false steps: - uses: actions/checkout@v2 - name: Install Snap7 Linux - if: ${{ matrix.installSnap7 && matrix.os == 'ubuntu-20.04' }} + if: ${{ matrix.os == 'ubuntu-20.04' }} run: | sudo add-apt-repository ppa:gijzelaar/snap7 sudo apt-get update sudo apt-get install libsnap7-1 libsnap7-dev - name: Install Snap7 MacOs - if: ${{ matrix.installSnap7 && matrix.os == 'macos-latest' }} + if: ${{ matrix.os == 'macos-latest' }} run: | brew install snap7 @@ -120,7 +93,7 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: | - ${{ matrix.dotnet-sdk }} + 6.x 7.x - name: Nuget Cache @@ -128,12 +101,12 @@ jobs: with: path: ~/.nuget/packages # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-${{ matrix.test-framework }}-nuget-${{ hashFiles('**/packages.lock.json') }} + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} restore-keys: | - ${{ runner.os }}-${{ matrix.test-framework }}-nuget + ${{ runner.os }}-nuget - name: Test - run: dotnet test --nologo --verbosity normal --logger GitHubActions --framework ${{ matrix.test-framework }} + run: dotnet test --nologo --verbosity normal --logger GitHubActions deploy: # Publish only when creating a GitHub Release diff --git a/S7.Net.UnitTest/S7.Net.UnitTest.csproj b/S7.Net.UnitTest/S7.Net.UnitTest.csproj index 3a67af5..2b29986 100644 --- a/S7.Net.UnitTest/S7.Net.UnitTest.csproj +++ b/S7.Net.UnitTest/S7.Net.UnitTest.csproj @@ -1,8 +1,13 @@  - + + net6.0;net7.0 + + net462;net6.0;net7.0 + + true Properties\S7.Net.snk false