appveyor.yml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. image:
  2. - Ubuntu2204
  3. - Visual Studio 2022
  4. services:
  5. - docker
  6. for:
  7. -
  8. matrix:
  9. only:
  10. - image: Ubuntu2204
  11. init:
  12. - git config --global core.autocrlf input
  13. before_build:
  14. - sh: mkdir artifacts -p
  15. build_script:
  16. - echo build
  17. - dotnet build -f net8.0 -c Debug test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj
  18. - dotnet build -f net8.0 -c Debug test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj
  19. - dotnet build -f net48 -c Debug test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj
  20. test_script:
  21. - sh: echo "Run unit tests"
  22. - sh: dotnet test -f net8.0 -c Debug --no-restore --no-build --results-directory artifacts --logger Appveyor --logger "console;verbosity=normal" --logger "liquid.md;LogFileName=linux_unit_test_net_8_report.md" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/linux_unit_test_net_8_coverage.xml test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj
  23. - sh: echo "Run integration tests"
  24. - sh: dotnet test -f net8.0 -c Debug --no-restore --no-build --results-directory artifacts --logger Appveyor --logger "console;verbosity=normal" --logger "liquid.md;LogFileName=linux_integration_test_net_8_report.md" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/linux_integration_test_net_8_coverage.xml test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj
  25. # Also run a subset of the integration tests targeting netfx using mono. This is a temporary measure to get
  26. # some coverage until a proper solution for running the .NET Framework integration tests in CI is found.
  27. # Running all the tests causes problems which are not worth solving in this rare configuration.
  28. # See https://github.com/sshnet/SSH.NET/pull/1462 and related links
  29. - sh: dotnet test -f net48 -c Debug --no-restore --no-build --results-directory artifacts --logger Appveyor --logger "console;verbosity=normal" --logger "liquid.md;LogFileName=linux_integration_test_net_48_report.md" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/linux_integration_test_net_48_coverage.xml --filter "Name~Ecdh|Name~Zlib|Name~Gcm" test/Renci.SshNet.IntegrationTests/Renci.SshNet.IntegrationTests.csproj
  30. -
  31. matrix:
  32. only:
  33. - image: Visual Studio 2022
  34. init:
  35. - git config --global core.autocrlf true
  36. before_build:
  37. - ps: mkdir artifacts -f
  38. build_script:
  39. - echo build
  40. - dotnet build Renci.SshNet.sln -c Debug
  41. - dotnet publish -c Release -r win-x64 /warnaserror .\test\Renci.SshNet.AotCompatibilityTestApp\
  42. - dotnet pack -c Release
  43. test_script:
  44. - ps: echo "Run unit tests for .NET 8.0"
  45. - ps: dotnet test -f net8.0 -c Debug --no-restore --no-build --results-directory artifacts --logger Appveyor --logger "console;verbosity=normal" --logger "liquid.md;LogFileName=windows_unit_test_net_8_report.md" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/windows_unit_test_net_8_coverage.xml test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj
  46. - ps: echo "Run unit tests for .NET Framework 4.6.2"
  47. - ps: dotnet test -f net462 -c Debug --no-restore --no-build --results-directory artifacts --logger Appveyor --logger "console;verbosity=normal" --logger "liquid.md;LogFileName=windows_unit_test_net_4_6_2_report.md" -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura -p:CoverletOutput=../../artifacts/windows_unit_test_net_4_6_2_coverage.xml test/Renci.SshNet.Tests/Renci.SshNet.Tests.csproj
  48. artifacts:
  49. - path: artifacts
  50. name: TestResults
  51. - path: src/**/*.nupkg
  52. - path: src/**/*.snupkg