25
25
- name : Build IntegrationTests .NET
26
26
run : dotnet build -f net9.0 test/Renci.SshNet.IntegrationTests/
27
27
28
- - name : Build IntegrationTests .NET Framework
29
- run : dotnet build -f net48 test/Renci.SshNet.IntegrationTests/
30
-
31
28
- name : Run Unit Tests .NET
32
29
run : |
33
30
dotnet test \
@@ -52,36 +49,14 @@ jobs:
52
49
-p:CoverletOutput=../../coverlet/linux_integration_test_net_9_coverage.xml \
53
50
test/Renci.SshNet.IntegrationTests/
54
51
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
-
77
52
- name : Archive Coverlet Results
78
53
uses : actions/upload-artifact@v4
79
54
with :
80
55
name : Coverlet Results Linux
81
56
path : coverlet
82
57
83
58
Windows :
84
- runs-on : windows-2022
59
+ runs-on : windows-2025
85
60
steps :
86
61
- name : Checkout
87
62
uses : actions/checkout@v4
@@ -132,6 +107,44 @@ jobs:
132
107
-p:CoverletOutput=../../coverlet/windows_unit_test_net_4_6_2_coverage.xml `
133
108
test/Renci.SshNet.Tests/
134
109
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
+
135
148
- name : Archive Coverlet Results
136
149
uses : actions/upload-artifact@v4
137
150
with :
0 commit comments