5
5
6
6
jobs :
7
7
build-win32 :
8
- name : build/ test on windows-latest
8
+ name : build, unit test on windows-latest
9
9
runs-on : windows-latest
10
10
# https://github.com/NuGet/Home/issues/11548
11
11
env :
15
15
uses : actions/checkout@v4
16
16
with :
17
17
submodules : true
18
- - name : Cache installers
19
- uses : actions/cache@v3
20
- with :
21
- # Note: the cache path is relative to the workspace directory
22
- # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#using-the-cache-action
23
- path : ~/installers
24
- key : ${{ runner.os }}-v0-${{ hashFiles('.ci/versions.json') }}
25
18
- name : Cache NuGet packages
26
19
uses : actions/cache@v3
27
20
with :
@@ -31,24 +24,96 @@ jobs:
31
24
key : ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }}
32
25
restore-keys : |
33
26
${{ runner.os }}-v1-nuget-
34
- - name : Install and Start RabbitMQ
35
- run : .\.ci\windows\gha-setup.ps1
36
- - name : List NuGet sources
37
- run : dotnet nuget locals all --list
38
27
- name : Build (Debug)
39
28
run : dotnet build ${{ github.workspace }}\Build.csproj
40
29
- name : Verify
41
- run : dotnet format ${{ github.workspace }}\RabbitMQDotNetClient.sln --verify-no-changes --verbosity=diagnostic
42
- - name : Test
43
- run : .\.ci\windows\gha-run-tests.ps1
30
+ run : dotnet format ${{ github.workspace }}\RabbitMQDotNetClient.sln --no-restore --verify-no-changes --verbosity=diagnostic
31
+ - name : APIApproval Test
32
+ run : dotnet test "${{ github.workspace }}\projects\Test\Unit\Unit.csproj" --no-restore --no-build --logger 'console;verbosity=detailed' --filter='FullyQualifiedName=Test.Unit.APIApproval.Approve'
33
+ - name : Unit Tests
34
+ run : dotnet test "${{ github.workspace }}\projects\Test\Unit\Unit.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
35
+ - name : Upload Build (Debug)
36
+ uses : actions/upload-artifact@v3
37
+ with :
38
+ name : rabbitmq-dotnet-client-build-win32
39
+ path : |
40
+ projects/Test/Unit/bin
41
+ projects/Test/Integration/bin
42
+ projects/Test/SequentialIntegration/bin
43
+ projects/RabbitMQ.*/bin
44
+ integration-win32 :
45
+ name : integration test on windows-latest
46
+ needs : build-win32
47
+ runs-on : windows-latest
48
+ # https://github.com/NuGet/Home/issues/11548
49
+ env :
50
+ NUGET_CERT_REVOCATION_MODE : offline
51
+ steps :
52
+ - name : Clone repository
53
+ uses : actions/checkout@v4
54
+ with :
55
+ submodules : true
56
+ - name : Cache installers
57
+ uses : actions/cache@v3
58
+ with :
59
+ # Note: the cache path is relative to the workspace directory
60
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#using-the-cache-action
61
+ path : ~/installers
62
+ key : ${{ runner.os }}-v0-${{ hashFiles('.ci/versions.json') }}
63
+ - name : Download Build (Debug)
64
+ uses : actions/download-artifact@v3
65
+ with :
66
+ name : rabbitmq-dotnet-client-build-win32
67
+ path : projects
68
+ - name : Install and Start RabbitMQ
69
+ id : install-start-rabbitmq
70
+ run : .\.ci\windows\gha-setup.ps1
71
+ - name : Integration Tests
72
+ run : dotnet test --environment "RABBITMQ_RABBITMQCTL_PATH=${{ steps.install-start-rabbitmq.outputs.path }}" --environment 'RABBITMQ_LONG_RUNNING_TESTS=false' --environment 'PASSWORD=grapefruit' --environment SSL_CERTS_DIR="${{ github.workspace }}\.ci\certs" "${{ github.workspace }}\projects\Test\Integration\Integration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
73
+ - name : Maybe upload RabbitMQ logs
74
+ if : failure()
75
+ uses : actions/upload-artifact@v3
76
+ with :
77
+ name : rabbitmq-logs-integration-win32
78
+ path : ~/AppData/Roaming/RabbitMQ/log/
79
+ sequential-integration-win32 :
80
+ name : sequential integration test on windows-latest
81
+ needs : build-win32
82
+ runs-on : windows-latest
83
+ # https://github.com/NuGet/Home/issues/11548
84
+ env :
85
+ NUGET_CERT_REVOCATION_MODE : offline
86
+ steps :
87
+ - name : Clone repository
88
+ uses : actions/checkout@v4
89
+ with :
90
+ submodules : true
91
+ - name : Cache installers
92
+ uses : actions/cache@v3
93
+ with :
94
+ # Note: the cache path is relative to the workspace directory
95
+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#using-the-cache-action
96
+ path : ~/installers
97
+ key : ${{ runner.os }}-v0-${{ hashFiles('.ci/versions.json') }}
98
+ - name : Download Build (Debug)
99
+ uses : actions/download-artifact@v3
100
+ with :
101
+ name : rabbitmq-dotnet-client-build-win32
102
+ path : projects
103
+ - name : Install and Start RabbitMQ
104
+ id : install-start-rabbitmq
105
+ run : .\.ci\windows\gha-setup.ps1
106
+ - name : Sequential Integration Tests
107
+ run : dotnet test --environment "RABBITMQ_RABBITMQCTL_PATH=${{ steps.install-start-rabbitmq.outputs.path }}" "${{ github.workspace }}\projects\Test\SequentialIntegration\SequentialIntegration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
44
108
- name : Maybe upload RabbitMQ logs
45
109
if : failure()
46
110
uses : actions/upload-artifact@v3
47
111
with :
48
- name : rabbitmq-logs
112
+ name : rabbitmq-logs-sequential-integration-win32
49
113
path : ~/AppData/Roaming/RabbitMQ/log/
50
- build :
51
- name : build/test on ubuntu-latest
114
+
115
+ build-ubuntu :
116
+ name : build, unit test on ubuntu-latest
52
117
runs-on : ubuntu-latest
53
118
steps :
54
119
- name : Clone repository
@@ -68,26 +133,87 @@ jobs:
68
133
key : ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }}
69
134
restore-keys : |
70
135
${{ runner.os }}-v1-nuget-
71
- - name : Start RabbitMQ
72
- id : start-rabbitmq
73
- run : ${{ github.workspace }}/.ci/ubuntu/gha-setup.sh
74
- - name : List NuGet sources
75
- run : dotnet nuget locals all --list
76
136
- name : Build (Debug)
77
137
run : dotnet build ${{ github.workspace }}/Build.csproj
78
138
- name : Verify
79
- run : dotnet format ${{ github.workspace }}/RabbitMQDotNetClient.sln --verify-no-changes --verbosity=diagnostic
80
- - name : Test
139
+ run : dotnet format ${{ github.workspace }}/RabbitMQDotNetClient.sln --no-restore --verify-no-changes --verbosity=diagnostic
140
+ - name : APIApproval Test
141
+ run : dotnet test "${{ github.workspace }}/projects/Test/Unit/Unit.csproj" --no-restore --no-build --logger 'console;verbosity=detailed' --filter='FullyQualifiedName=Test.Unit.APIApproval.Approve'
142
+ - name : Unit Tests
143
+ run : dotnet test "${{ github.workspace }}/projects/Test/Unit/Unit.csproj" --no-restore --no-build --verbosity=diagnostic --logger 'console;verbosity=detailed'
144
+ - name : Upload Build (Debug)
145
+ uses : actions/upload-artifact@v3
146
+ with :
147
+ name : rabbitmq-dotnet-client-build-ubuntu
148
+ path : |
149
+ projects/Test/Unit/bin
150
+ projects/Test/Integration/bin
151
+ projects/Test/SequentialIntegration/bin
152
+ projects/RabbitMQ.*/bin
153
+ integration-ubuntu :
154
+ name : integration test on ubuntu-latest
155
+ needs : build-ubuntu
156
+ runs-on : ubuntu-latest
157
+ steps :
158
+ - name : Clone repository
159
+ uses : actions/checkout@v4
160
+ with :
161
+ submodules : true
162
+ - name : Setup .NET
163
+ uses : actions/setup-dotnet@v3
164
+ with :
165
+ dotnet-version : 6.x
166
+ - name : Download Build (Debug)
167
+ uses : actions/download-artifact@v3
168
+ with :
169
+ name : rabbitmq-dotnet-client-build-ubuntu
170
+ path : projects
171
+ - name : Start RabbitMQ
172
+ id : start-rabbitmq
173
+ run : ${{ github.workspace }}/.ci/ubuntu/gha-setup.sh
174
+ - name : Integration Tests
81
175
run : |
82
176
dotnet test \
83
177
--environment "RABBITMQ_RABBITMQCTL_PATH=DOCKER:${{ steps.start-rabbitmq.outputs.id }}" \
84
- --environment 'RABBITMQ_LONG_RUNNING_TESTS=true ' \
178
+ --environment 'RABBITMQ_LONG_RUNNING_TESTS=false ' \
85
179
--environment 'PASSWORD=grapefruit' \
86
180
--environment SSL_CERTS_DIR="${{ github.workspace }}/.ci/certs" \
87
- "${{ github.workspace }}/projects/Unit/Unit.csproj" --no-restore --no-build --logger 'console;verbosity=detailed' --framework 'net6.0'
181
+ "${{ github.workspace }}/projects/Test/Integration/Integration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
182
+ - name : Maybe upload RabbitMQ logs
183
+ if : failure()
184
+ uses : actions/upload-artifact@v3
185
+ with :
186
+ name : rabbitmq-logs-integration-ubuntu
187
+ path : ${{ github.workspace }}/.ci/ubuntu/log/
188
+ sequential-integration-ubuntu :
189
+ name : sequential integration test on ubuntu-latest
190
+ needs : build-ubuntu
191
+ runs-on : ubuntu-latest
192
+ steps :
193
+ - name : Clone repository
194
+ uses : actions/checkout@v4
195
+ with :
196
+ submodules : true
197
+ - name : Setup .NET
198
+ uses : actions/setup-dotnet@v3
199
+ with :
200
+ dotnet-version : 6.x
201
+ - name : Download Build (Debug)
202
+ uses : actions/download-artifact@v3
203
+ with :
204
+ name : rabbitmq-dotnet-client-build-ubuntu
205
+ path : projects
206
+ - name : Start RabbitMQ
207
+ id : start-rabbitmq
208
+ run : ${{ github.workspace }}/.ci/ubuntu/gha-setup.sh
209
+ - name : Sequential Integration Tests
210
+ run : |
211
+ dotnet test \
212
+ --environment "RABBITMQ_RABBITMQCTL_PATH=DOCKER:${{ steps.start-rabbitmq.outputs.id }}" \
213
+ "${{ github.workspace }}/projects/Test/SequentialIntegration/SequentialIntegration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
88
214
- name : Maybe upload RabbitMQ logs
89
215
if : failure()
90
216
uses : actions/upload-artifact@v3
91
217
with :
92
- name : rabbitmq-logs
218
+ name : rabbitmq-logs-sequential-integration-ubuntu
93
219
path : ${{ github.workspace }}/.ci/ubuntu/log/
0 commit comments