2525 - name : Build IntegrationTests .NET
2626 run : dotnet build -f net9.0 test/Renci.SshNet.IntegrationTests/
2727
28- - name : Build IntegrationTests .NET Framework
29- run : dotnet build -f net48 test/Renci.SshNet.IntegrationTests/
30-
3128 - name : Run Unit Tests .NET
3229 run : |
3330 dotnet test \
@@ -52,36 +49,14 @@ jobs:
5249 -p:CoverletOutput=../../coverlet/linux_integration_test_net_9_coverage.xml \
5350 test/Renci.SshNet.IntegrationTests/
5451
55- # Also run a subset of the integration tests targeting netfx using mono. This is a temporary measure to get
56- # some coverage until a proper solution for running the .NET Framework integration tests in CI is found.
57- # Running all the tests causes problems which are not worth solving in this rare configuration.
58- # See https://github.com/sshnet/SSH.NET/pull/1462 and related links
59- - name : Run Integration Tests Mono
60- run : |
61- sudo apt-get install ca-certificates gnupg
62- sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
63- echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
64- sudo apt-get update
65- sudo apt-get install mono-devel
66- dotnet test \
67- -f net48 \
68- --no-build \
69- --logger "console;verbosity=normal" \
70- --logger GitHubActions \
71- -p:CollectCoverage=true \
72- -p:CoverletOutputFormat=cobertura \
73- -p:CoverletOutput=../../coverlet/linux_integration_test_net_48_coverage.xml \
74- --filter "Name~Ecdh|Name~ECDsa|Name~Zlib|Name~Gcm" \
75- test/Renci.SshNet.IntegrationTests/
76-
7752 - name : Archive Coverlet Results
7853 uses : actions/upload-artifact@v4
7954 with :
8055 name : Coverlet Results Linux
8156 path : coverlet
8257
8358 Windows :
84- runs-on : windows-2022
59+ runs-on : windows-2025
8560 steps :
8661 - name : Checkout
8762 uses : actions/checkout@v4
@@ -132,6 +107,44 @@ jobs:
132107 -p:CoverletOutput=../../coverlet/windows_unit_test_net_4_6_2_coverage.xml `
133108 test/Renci.SshNet.Tests/
134109
110+ Windows-Integration-Tests :
111+ name : Windows Integration Tests
112+ runs-on : windows-2025
113+ steps :
114+ - name : Checkout
115+ uses : actions/checkout@v4
116+ with :
117+ fetch-depth : 0 # needed for Nerdbank.GitVersioning
118+
119+ - name : Setup .NET
120+ uses : actions/setup-dotnet@v4
121+ with :
122+ dotnet-version : 9.0.x
123+
124+ - name : Setup WSL2
125+ uses : Vampire/setup-wsl@v5
126+ with :
127+ distribution : Ubuntu-24.04
128+
129+ - name : Setup SSH Server
130+ shell : wsl-bash {0}
131+ run : |
132+ apt-get update && apt-get upgrade -y
133+ apt-get install -y podman
134+ podman build -t renci-ssh-tests-server-image -f test/Renci.SshNet.IntegrationTests/Dockerfile test/Renci.SshNet.IntegrationTests/
135+ podman run --rm -h renci-ssh-tests-server -d -p 2222:22 renci-ssh-tests-server-image
136+
137+ - name : Run Integration Tests .NET Framework
138+ run :
139+ dotnet test `
140+ -f net48 `
141+ --logger "console;verbosity=normal" `
142+ --logger GitHubActions `
143+ -p:CollectCoverage=true `
144+ -p:CoverletOutputFormat=cobertura `
145+ -p:CoverletOutput=..\..\coverlet\windows_integration_test_net_4_8_coverage.xml `
146+ test\Renci.SshNet.IntegrationTests\
147+
135148 - name : Archive Coverlet Results
136149 uses : actions/upload-artifact@v4
137150 with :
0 commit comments