From bbf41eca52ebe90216b5d6bba28bf02503bb6629 Mon Sep 17 00:00:00 2001 From: Serge K Date: Wed, 15 Nov 2023 19:51:07 +0700 Subject: [PATCH] test: add net462 tests --- .github/workflows/ci.yml | 32 +++++++++++---------- tests/units/FingerprintBuilder.Tests.csproj | 9 ++++-- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b8cf07..8cf1fcb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: - "main" + - "ci/windows" tags: - "v*" pull_request: @@ -12,28 +13,29 @@ on: workflow_dispatch: jobs: - build: - name: Build & Test - runs-on: ubuntu-22.04 + build-windows: + name: Build & Test (Windows) + runs-on: windows-2022 steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: | - 5.0.x - 6.0.x - 7.0.x + - name: Run tests + run: dotnet test -c Release - - name: Restore - run: dotnet restore + build-linux: + name: Build, Test & Pack (Linux) + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build - run: dotnet build --no-restore -c Release -p:ContinuousIntegrationBuild=true + run: dotnet build -c Release -p:ContinuousIntegrationBuild=true - name: Run tests run: dotnet test --no-build -c Release @@ -62,7 +64,7 @@ jobs: github: name: Deploy to GitHub - needs: [build] + needs: [build-windows, build-linux] if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-22.04 steps: @@ -75,7 +77,7 @@ jobs: nuget: name: Deploy to NuGet - needs: [build] + needs: [build-windows, build-linux] if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-22.04 steps: diff --git a/tests/units/FingerprintBuilder.Tests.csproj b/tests/units/FingerprintBuilder.Tests.csproj index 366c045..c8270be 100644 --- a/tests/units/FingerprintBuilder.Tests.csproj +++ b/tests/units/FingerprintBuilder.Tests.csproj @@ -1,7 +1,8 @@  11.0 - net5.0;net6.0;net7.0 + net6.0 + net462;net6.0 true opencover $(NoWarn);CS0618 @@ -12,8 +13,10 @@ - - + + all + runtime; build; native; contentfiles; analyzers + all runtime; build; native; contentfiles; analyzers; buildtransitive