Skip to content

Commit c5f9f40

Browse files
committed
revert
1 parent 8ad71df commit c5f9f40

File tree

3 files changed

+82
-100
lines changed

3 files changed

+82
-100
lines changed

.github/workflows/build.yml

Lines changed: 81 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,44 @@ jobs:
1414
with:
1515
fetch-depth: 0 # needed for Nerdbank.GitVersioning
1616

17-
# - name: Setup .NET
18-
# uses: actions/setup-dotnet@v5
19-
20-
# - name: Build Unit Tests .NET
21-
# run: dotnet build -f net9.0 test/Renci.SshNet.Tests/
22-
23-
# - name: Build IntegrationTests .NET
24-
# run: dotnet build -f net9.0 test/Renci.SshNet.IntegrationTests/
25-
26-
# - name: Run Unit Tests .NET
27-
# run: |
28-
# dotnet test \
29-
# -f net9.0 \
30-
# --no-build \
31-
# --logger "console;verbosity=normal" \
32-
# --logger GitHubActions \
33-
# -p:CollectCoverage=true \
34-
# -p:CoverletOutputFormat=cobertura \
35-
# -p:CoverletOutput=../../coverlet/linux_unit_test_net_9_coverage.xml \
36-
# test/Renci.SshNet.Tests/
37-
38-
# - name: Run Integration Tests .NET
39-
# run: |
40-
# dotnet test \
41-
# -f net9.0 \
42-
# --no-build \
43-
# --logger "console;verbosity=normal" \
44-
# --logger GitHubActions \
45-
# -p:CollectCoverage=true \
46-
# -p:CoverletOutputFormat=cobertura \
47-
# -p:CoverletOutput=../../coverlet/linux_integration_test_net_9_coverage.xml \
48-
# test/Renci.SshNet.IntegrationTests/
49-
50-
# - name: Archive Coverlet Results
51-
# uses: actions/upload-artifact@v4
52-
# with:
53-
# name: Coverlet Results Linux
54-
# path: coverlet
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v5
19+
20+
- name: Build Unit Tests .NET
21+
run: dotnet build -f net9.0 test/Renci.SshNet.Tests/
22+
23+
- name: Build IntegrationTests .NET
24+
run: dotnet build -f net9.0 test/Renci.SshNet.IntegrationTests/
25+
26+
- name: Run Unit Tests .NET
27+
run: |
28+
dotnet test \
29+
-f net9.0 \
30+
--no-build \
31+
--logger "console;verbosity=normal" \
32+
--logger GitHubActions \
33+
-p:CollectCoverage=true \
34+
-p:CoverletOutputFormat=cobertura \
35+
-p:CoverletOutput=../../coverlet/linux_unit_test_net_9_coverage.xml \
36+
test/Renci.SshNet.Tests/
37+
38+
- name: Run Integration Tests .NET
39+
run: |
40+
dotnet test \
41+
-f net9.0 \
42+
--no-build \
43+
--logger "console;verbosity=normal" \
44+
--logger GitHubActions \
45+
-p:CollectCoverage=true \
46+
-p:CoverletOutputFormat=cobertura \
47+
-p:CoverletOutput=../../coverlet/linux_integration_test_net_9_coverage.xml \
48+
test/Renci.SshNet.IntegrationTests/
49+
50+
- name: Archive Coverlet Results
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: Coverlet Results Linux
54+
path: coverlet
5555

5656
Windows:
5757
runs-on: windows-2025
@@ -61,47 +61,47 @@ jobs:
6161
with:
6262
fetch-depth: 0 # needed for Nerdbank.GitVersioning
6363

64-
# - name: Setup .NET
65-
# uses: actions/setup-dotnet@v5
66-
67-
# - name: Build Solution
68-
# run: dotnet build Renci.SshNet.sln
69-
70-
# - name: Publish AOT Compatibility Test App
71-
# run: dotnet publish -r win-x64 /warnaserror test/Renci.SshNet.AotCompatibilityTestApp/
72-
73-
# - name: Create NuGet Package
74-
# run: dotnet pack
75-
76-
# - name: Archive NuGet Package
77-
# uses: actions/upload-artifact@v4
78-
# with:
79-
# name: NuGet Package
80-
# path: src/Renci.SshNet/bin/Release/*.*nupkg
81-
82-
# - name: Run Unit Tests .NET
83-
# run: |
84-
# dotnet test `
85-
# -f net9.0 `
86-
# --no-build `
87-
# --logger "console;verbosity=normal" `
88-
# --logger GitHubActions `
89-
# -p:CollectCoverage=true `
90-
# -p:CoverletOutputFormat=cobertura `
91-
# -p:CoverletOutput=../../coverlet/windows_unit_test_net_9_coverage.xml `
92-
# test/Renci.SshNet.Tests/
93-
94-
# - name: Run Unit Tests .NET Framework
95-
# run: |
96-
# dotnet test `
97-
# -f net462 `
98-
# --no-build `
99-
# --logger "console;verbosity=normal" `
100-
# --logger GitHubActions `
101-
# -p:CollectCoverage=true `
102-
# -p:CoverletOutputFormat=cobertura `
103-
# -p:CoverletOutput=../../coverlet/windows_unit_test_net_4_6_2_coverage.xml `
104-
# test/Renci.SshNet.Tests/
64+
- name: Setup .NET
65+
uses: actions/setup-dotnet@v5
66+
67+
- name: Build Solution
68+
run: dotnet build Renci.SshNet.sln
69+
70+
- name: Publish AOT Compatibility Test App
71+
run: dotnet publish -r win-x64 /warnaserror test/Renci.SshNet.AotCompatibilityTestApp/
72+
73+
- name: Create NuGet Package
74+
run: dotnet pack
75+
76+
- name: Archive NuGet Package
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: NuGet Package
80+
path: src/Renci.SshNet/bin/Release/*.*nupkg
81+
82+
- name: Run Unit Tests .NET
83+
run: |
84+
dotnet test `
85+
-f net9.0 `
86+
--no-build `
87+
--logger "console;verbosity=normal" `
88+
--logger GitHubActions `
89+
-p:CollectCoverage=true `
90+
-p:CoverletOutputFormat=cobertura `
91+
-p:CoverletOutput=../../coverlet/windows_unit_test_net_9_coverage.xml `
92+
test/Renci.SshNet.Tests/
93+
94+
- name: Run Unit Tests .NET Framework
95+
run: |
96+
dotnet test `
97+
-f net462 `
98+
--no-build `
99+
--logger "console;verbosity=normal" `
100+
--logger GitHubActions `
101+
-p:CollectCoverage=true `
102+
-p:CoverletOutputFormat=cobertura `
103+
-p:CoverletOutput=../../coverlet/windows_unit_test_net_4_6_2_coverage.xml `
104+
test/Renci.SshNet.Tests/
105105
106106
Windows-Integration-Tests:
107107
name: Windows Integration Tests
@@ -132,9 +132,8 @@ jobs:
132132
run:
133133
dotnet test `
134134
-f net48 `
135-
--logger "console;verbosity=detailed" `
135+
--logger "console;verbosity=normal" `
136136
--logger GitHubActions `
137-
--filter "FullyQualifiedName~ConnectivityTests" `
138137
-p:CollectCoverage=true `
139138
-p:CoverletOutputFormat=cobertura `
140139
-p:CoverletOutput=..\..\coverlet\windows_integration_test_net_4_8_coverage.xml `
@@ -144,9 +143,8 @@ jobs:
144143
run:
145144
dotnet test `
146145
-f net9.0 `
147-
--logger "console;verbosity=detailed" `
146+
--logger "console;verbosity=normal" `
148147
--logger GitHubActions `
149-
--filter "FullyQualifiedName~ConnectivityTests" `
150148
-p:CollectCoverage=true `
151149
-p:CoverletOutputFormat=cobertura `
152150
-p:CoverletOutput=..\..\coverlet\windows_integration_test_net_9_coverage.xml `

test/Renci.SshNet.IntegrationTests/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ RUN apk update && apk upgrade --no-cache && \
4141
echo 'sshnetadm:ssh4ever' | chpasswd && \
4242
addgroup sshnetadm sudo && \
4343
dos2unix /opt/sshnet/* && \
44-
chmod -R 777 /var/log && \
4544
# install shadow package; we use chage command in this package to expire/unexpire password of the sshnet user
4645
apk add --no-cache shadow && \
4746
# allow us to use telnet command; we use this in the remote port forwarding tests

test/Renci.SshNet.IntegrationTests/TestsFixtures/InfrastructureFixture.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,9 @@ public async Task InitializeAsync()
8787

8888
public async Task DisposeAsync()
8989
{
90-
#pragma warning disable S6966 // Awaitable method should be used
91-
try
92-
{
93-
using SftpClient client = new(new LinuxAdminConnectionFactory(SshServerHostName, SshServerPort).Create());
94-
95-
client.Connect();
96-
97-
Console.WriteLine("=== start auth.log ===");
98-
Console.WriteLine(client.ReadAllText("/var/log/auth.log"));
99-
Console.WriteLine("=== end auth.log ===");
100-
}
101-
catch (Exception ex)
102-
{
103-
Console.Error.WriteLine(ex.ToString());
104-
}
105-
10690
if (_sshServer != null)
10791
{
92+
#pragma warning disable S6966 // Awaitable method should be used
10893
//try
10994
//{
11095
// File.WriteAllBytes(@"C:\tmp\auth.log", await _sshServer.ReadFileAsync("/var/log/auth.log").ConfigureAwait(false));

0 commit comments

Comments
 (0)