55
66jobs :
77 build-win32 :
8- name : build/ test on windows-latest
8+ name : build, unit test on windows-latest
99 runs-on : windows-latest
1010 # https://github.com/NuGet/Home/issues/11548
1111 env :
1515 uses : actions/checkout@v4
1616 with :
1717 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') }}
2518 - name : Cache NuGet packages
2619 uses : actions/cache@v3
2720 with :
@@ -31,24 +24,99 @@ jobs:
3124 key : ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }}
3225 restore-keys : |
3326 ${{ 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
3827 - name : Build (Debug)
3928 run : dotnet build ${{ github.workspace }}\Build.csproj
4029 - 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/AsyncIntegration/bin
42+ projects/Test/Integration/bin
43+ projects/Test/SequentialIntegration/bin
44+ projects/RabbitMQ.*/bin
45+ integration-win32 :
46+ name : integration test on windows-latest
47+ needs : build-win32
48+ runs-on : windows-latest
49+ # https://github.com/NuGet/Home/issues/11548
50+ env :
51+ NUGET_CERT_REVOCATION_MODE : offline
52+ steps :
53+ - name : Clone repository
54+ uses : actions/checkout@v4
55+ with :
56+ submodules : true
57+ - name : Cache installers
58+ uses : actions/cache@v3
59+ with :
60+ # Note: the cache path is relative to the workspace directory
61+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#using-the-cache-action
62+ path : ~/installers
63+ key : ${{ runner.os }}-v0-${{ hashFiles('.ci/versions.json') }}
64+ - name : Download Build (Debug)
65+ uses : actions/download-artifact@v3
66+ with :
67+ name : rabbitmq-dotnet-client-build-win32
68+ path : projects
69+ - name : Install and Start RabbitMQ
70+ id : install-start-rabbitmq
71+ run : .\.ci\windows\gha-setup.ps1
72+ - name : Async Integration Tests
73+ run : dotnet test --environment "RABBITMQ_RABBITMQCTL_PATH=${{ steps.install-start-rabbitmq.outputs.path }}" --environment 'RABBITMQ_LONG_RUNNING_TESTS=false' "${{ github.workspace }}\projects\Test\AsyncIntegration\AsyncIntegration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
74+ - name : Integration Tests
75+ 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'
4476 - name : Maybe upload RabbitMQ logs
4577 if : failure()
4678 uses : actions/upload-artifact@v3
4779 with :
48- name : rabbitmq-logs
80+ name : rabbitmq-logs-integration-win32
4981 path : ~/AppData/Roaming/RabbitMQ/log/
50- build :
51- name : build/test on ubuntu-latest
82+ sequential-integration-win32 :
83+ name : sequential integration test on windows-latest
84+ needs : build-win32
85+ runs-on : windows-latest
86+ # https://github.com/NuGet/Home/issues/11548
87+ env :
88+ NUGET_CERT_REVOCATION_MODE : offline
89+ steps :
90+ - name : Clone repository
91+ uses : actions/checkout@v4
92+ with :
93+ submodules : true
94+ - name : Cache installers
95+ uses : actions/cache@v3
96+ with :
97+ # Note: the cache path is relative to the workspace directory
98+ # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#using-the-cache-action
99+ path : ~/installers
100+ key : ${{ runner.os }}-v0-${{ hashFiles('.ci/versions.json') }}
101+ - name : Download Build (Debug)
102+ uses : actions/download-artifact@v3
103+ with :
104+ name : rabbitmq-dotnet-client-build-win32
105+ path : projects
106+ - name : Install and Start RabbitMQ
107+ id : install-start-rabbitmq
108+ run : .\.ci\windows\gha-setup.ps1
109+ - name : Sequential Integration Tests
110+ 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'
111+ - name : Maybe upload RabbitMQ logs
112+ if : failure()
113+ uses : actions/upload-artifact@v3
114+ with :
115+ name : rabbitmq-logs-sequential-integration-win32
116+ path : ~/AppData/Roaming/RabbitMQ/log/
117+
118+ build-ubuntu :
119+ name : build, unit test on ubuntu-latest
52120 runs-on : ubuntu-latest
53121 steps :
54122 - name : Clone repository
@@ -68,26 +136,93 @@ jobs:
68136 key : ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }}
69137 restore-keys : |
70138 ${{ 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
76139 - name : Build (Debug)
77140 run : dotnet build ${{ github.workspace }}/Build.csproj
78141 - name : Verify
79- run : dotnet format ${{ github.workspace }}/RabbitMQDotNetClient.sln --verify-no-changes --verbosity=diagnostic
80- - name : Test
142+ run : dotnet format ${{ github.workspace }}/RabbitMQDotNetClient.sln --no-restore --verify-no-changes --verbosity=diagnostic
143+ - name : APIApproval Test
144+ run : dotnet test "${{ github.workspace }}/projects/Test/Unit/Unit.csproj" --no-restore --no-build --logger 'console;verbosity=detailed' --filter='FullyQualifiedName=Test.Unit.APIApproval.Approve'
145+ - name : Unit Tests
146+ run : dotnet test "${{ github.workspace }}/projects/Test/Unit/Unit.csproj" --no-restore --no-build --verbosity=diagnostic --logger 'console;verbosity=detailed'
147+ - name : Upload Build (Debug)
148+ uses : actions/upload-artifact@v3
149+ with :
150+ name : rabbitmq-dotnet-client-build-ubuntu
151+ path : |
152+ projects/Test/Unit/bin
153+ projects/Test/AsyncIntegration/bin
154+ projects/Test/Integration/bin
155+ projects/Test/SequentialIntegration/bin
156+ projects/RabbitMQ.*/bin
157+ integration-ubuntu :
158+ name : integration test on ubuntu-latest
159+ needs : build-ubuntu
160+ runs-on : ubuntu-latest
161+ steps :
162+ - name : Clone repository
163+ uses : actions/checkout@v4
164+ with :
165+ submodules : true
166+ - name : Setup .NET
167+ uses : actions/setup-dotnet@v3
168+ with :
169+ dotnet-version : 6.x
170+ - name : Download Build (Debug)
171+ uses : actions/download-artifact@v3
172+ with :
173+ name : rabbitmq-dotnet-client-build-ubuntu
174+ path : projects
175+ - name : Start RabbitMQ
176+ id : start-rabbitmq
177+ run : ${{ github.workspace }}/.ci/ubuntu/gha-setup.sh
178+ - name : Async Integration Tests
81179 run : |
82180 dotnet test \
83181 --environment "RABBITMQ_RABBITMQCTL_PATH=DOCKER:${{ steps.start-rabbitmq.outputs.id }}" \
84- --environment 'RABBITMQ_LONG_RUNNING_TESTS=true' \
182+ "${{ github.workspace }}/projects/Test/AsyncIntegration/AsyncIntegration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
183+ - name : Integration Tests
184+ run : |
185+ dotnet test \
186+ --environment "RABBITMQ_RABBITMQCTL_PATH=DOCKER:${{ steps.start-rabbitmq.outputs.id }}" \
187+ --environment 'RABBITMQ_LONG_RUNNING_TESTS=false' \
85188 --environment 'PASSWORD=grapefruit' \
86189 --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'
190+ "${{ github.workspace }}/projects/Test/Integration/Integration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
191+ - name : Maybe upload RabbitMQ logs
192+ if : failure()
193+ uses : actions/upload-artifact@v3
194+ with :
195+ name : rabbitmq-logs-integration-ubuntu
196+ path : ${{ github.workspace }}/.ci/ubuntu/log/
197+ sequential-integration-ubuntu :
198+ name : sequential integration test on ubuntu-latest
199+ needs : build-ubuntu
200+ runs-on : ubuntu-latest
201+ steps :
202+ - name : Clone repository
203+ uses : actions/checkout@v4
204+ with :
205+ submodules : true
206+ - name : Setup .NET
207+ uses : actions/setup-dotnet@v3
208+ with :
209+ dotnet-version : 6.x
210+ - name : Download Build (Debug)
211+ uses : actions/download-artifact@v3
212+ with :
213+ name : rabbitmq-dotnet-client-build-ubuntu
214+ path : projects
215+ - name : Start RabbitMQ
216+ id : start-rabbitmq
217+ run : ${{ github.workspace }}/.ci/ubuntu/gha-setup.sh
218+ - name : Sequential Integration Tests
219+ run : |
220+ dotnet test \
221+ --environment "RABBITMQ_RABBITMQCTL_PATH=DOCKER:${{ steps.start-rabbitmq.outputs.id }}" \
222+ "${{ github.workspace }}/projects/Test/SequentialIntegration/SequentialIntegration.csproj" --no-restore --no-build --logger 'console;verbosity=detailed'
88223 - name : Maybe upload RabbitMQ logs
89224 if : failure()
90225 uses : actions/upload-artifact@v3
91226 with :
92- name : rabbitmq-logs
227+ name : rabbitmq-logs-sequential-integration-ubuntu
93228 path : ${{ github.workspace }}/.ci/ubuntu/log/
0 commit comments