From d0092d60ee67f6acc470bbf5ac7a6155d7d9c1e4 Mon Sep 17 00:00:00 2001 From: Marius Thesing Date: Fri, 15 Nov 2024 19:26:58 +0100 Subject: [PATCH] temp --- .github/workflows/build.yml | 51 ++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2c978c69d..5e8c6e6eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,8 @@ name: Build on: [ push ] jobs: - build: - + Build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 with: @@ -15,9 +13,54 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.x - - name: Build Tests .NET + - name: Build Unit Tests .NET run: dotnet build -f net8.0 -c Debug test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj - name: Build IntegrationTests .NET run: dotnet build -f net8.0 -c Debug test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj - name: Build IntegrationTests .NET Framework run: dotnet build -f net48 -c Debug test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj + - name: Run Unit Tests + run: | + dotnet test \ + -f net8.0 \ + -c Debug \ + --no-restore \ + --no-build \ + --results-directory artifacts \ + --logger "console;verbosity=normal" \ + -p:CollectCoverage=true \ + -p:CoverletOutputFormat=cobertura \ + -p:CoverletOutput=../../artifacts/linux_unit_test_net_8_coverage.xml \ + test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj + - name: Run Integration Tests .NET + run: | + dotnet test \ + -f net8.0 \ + -c Debug \ + --no-restore \ + --no-build \ + --results-directory artifacts \ + --logger "console;verbosity=normal" \ + -p:CollectCoverage=true \ + -p:CoverletOutputFormat=cobertura \ + -p:CoverletOutput=../../artifacts/linux_integration_test_net_8_coverage.xml \ + test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj + # Also run a subset of the integration tests targeting netfx using mono. This is a temporary measure to get + # some coverage until a proper solution for running the .NET Framework integration tests in CI is found. + # Running all the tests causes problems which are not worth solving in this rare configuration. + # See https://github.com/sshnet/SSH.NET/pull/1462 and related links + - name: Run Integration Tests Mono + run: | + dotnet test \ + -f net48 \ + -c Debug \ + --no-restore \ + --no-build \ + --results-directory artifacts \ + --logger "console;verbosity=normal" \ + -p:CollectCoverage=true \ + -p:CoverletOutputFormat=cobertura \ + -p:CoverletOutput=../../artifacts/linux_integration_test_net_48_coverage.xml \ + --filter \ + "Name~Ecdh|Name~ECDsa|Name~Zlib|Name~Gcm" \ + test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj