File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed
test/Renci.SshNet.IntegrationTests/TestsFixtures Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,18 @@ jobs:
128
128
podman build -t renci-ssh-tests-server-image -f test/Renci.SshNet.IntegrationTests/Dockerfile test/Renci.SshNet.IntegrationTests/
129
129
podman run --rm -h renci-ssh-tests-server -d -p 2222:22 renci-ssh-tests-server-image
130
130
131
+ - name : Run Integration Tests .NET
132
+ run :
133
+ dotnet test `
134
+ -f net9.0 `
135
+ --logger "console;verbosity=normal" `
136
+ --logger GitHubActions `
137
+ --filter "Name~Curve25519|Name~X25519" `
138
+ -p:CollectCoverage=true `
139
+ -p:CoverletOutputFormat=cobertura `
140
+ -p:CoverletOutput=..\..\coverlet\windows_integration_test_net_9_coverage.xml `
141
+ test\Renci.SshNet.IntegrationTests\
142
+
131
143
- name : Run Integration Tests .NET Framework
132
144
run :
133
145
dotnet test `
Original file line number Diff line number Diff line change 1
- using DotNet . Testcontainers . Builders ;
1
+ using System . Runtime . InteropServices ;
2
+
3
+ using DotNet . Testcontainers . Builders ;
2
4
using DotNet . Testcontainers . Containers ;
3
5
using DotNet . Testcontainers . Images ;
4
6
@@ -38,16 +40,17 @@ private InfrastructureFixture()
38
40
39
41
public async Task InitializeAsync ( )
40
42
{
41
- // for the .NET Framework Tests in CI, the Container is set up in WSL2 with Podman
42
- #if NETFRAMEWORK
43
- if ( Environment . GetEnvironmentVariable ( "CI" ) == "true" )
43
+ #pragma warning disable MA0144 // use System.OperatingSystem to check the current OS
44
+ // for the Windows Tests in CI, the Container is set up in WSL2 with Podman
45
+ if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) &&
46
+ Environment . GetEnvironmentVariable ( "CI" ) == "true" )
47
+ #pragma warning restore MA0144 // use System.OperatingSystem to check the current OS
44
48
{
45
49
SshServerPort = 2222 ;
46
50
SshServerHostName = "localhost" ;
47
51
await Task . Delay ( 1_000 ) ;
48
52
return ;
49
53
}
50
- #endif
51
54
52
55
var containerLogger = _loggerFactory . CreateLogger ( "testcontainers" ) ;
53
56
You can’t perform that action at this time.
0 commit comments