forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
254 lines (214 loc) · 9.34 KB
/
nuget-pack.yml
File metadata and controls
254 lines (214 loc) · 9.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
name: NuGet Pack
on: workflow_dispatch
jobs:
build-test-all:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
sqlserver:
image: mcr.microsoft.com/mssql/server:2017-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: Test!tesT
MSSQL_PID: Developer
ports:
- 48501:1433
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 48303:5432
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.100'
- name: Env setup
run: |
echo "SERVICESTACK_LICENSE=${{ secrets.SERVICESTACK_LICENSE }}" >> $GITHUB_ENV
echo "AWS_ACCESS_KEY=${{ secrets.AWS_ACCESS_KEY }}" >> $GITHUB_ENV
echo "AWS_SECRET_KEY=${{ secrets.AWS_SECRET_KEY }}" >> $GITHUB_ENV
# Individual build steps to make it easy to catch issues.
- name: Build Text
working-directory: ServiceStack.Text/build
run: dotnet build ./build.proj
- name: Text tests
run: dotnet test --framework net8.0 ./ServiceStack.Text/tests/ServiceStack.Text.Tests/ServiceStack.Text.Tests.csproj --logger 'trx;LogFileName=test-results.trx'
- name: Text Tests Report
uses: dorny/test-reporter@v1
if: (success() || failure()) && steps.test_integration.outcome != 'skipped'
with:
name: Text Tests
path: ./ServiceStack.Text/tests/ServiceStack.Text.Tests/TestResults/test-results.trx
reporter: dotnet-trx
only-summary: 'true'
- name: Build
working-directory: ServiceStack.Redis/build
run: dotnet build ./build.proj
- name: Env setup
run: |
echo "SERVICESTACK_LICENSE=${{ secrets.SERVICESTACK_LICENSE }}" >> $GITHUB_ENV
echo "CI_RABBITMQ=gistlyn.com:45672" >> $GITHUB_ENV
echo "CI_DYNAMODB=http://gistlyn.com:48000" >> $GITHUB_ENV
- name: Redis Test Without Integration
working-directory: ServiceStack.Redis/tests
run: dotnet test --framework net8.0 ./ServiceStack.Redis.Tests/ServiceStack.Redis.Tests.csproj --filter TestCategory\!=Integration --logger 'trx;LogFileName=non-integration-results.trx'
- name: Redis Non-Integration Tests Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Redis Non-Integration Tests
path: ./ServiceStack.Redis/tests/ServiceStack.Redis.Tests/TestResults/non-integration-results.trx
reporter: dotnet-trx
only-summary: 'true'
- name: Redis Test With Integration
id: test_integration
working-directory: ServiceStack.Redis/tests
run: dotnet test --framework net8.0 ./ServiceStack.Redis.Tests/ServiceStack.Redis.Tests.csproj --filter TestCategory=Integration --logger 'trx;LogFileName=integration-results.trx'
- name: Redis Integration Tests Report
uses: dorny/test-reporter@v1
if: (success() || failure()) && steps.test_integration.outcome != 'skipped'
with:
name: Redis Integration Tests
path: ./ServiceStack.Redis/tests/ServiceStack.Redis.Tests/TestResults/integration-results.trx
reporter: dotnet-trx
only-summary: 'true'
- name: Build OrmLite
working-directory: ServiceStack.OrmLite/build
run: dotnet build ./build.proj
- name: Test Sqlite
working-directory: ServiceStack.OrmLite/tests
env:
ORMLITE_DIALECT: Sqlite
run: dotnet test --framework net8.0 ./ServiceStack.OrmLite.SqliteTests/ServiceStack.OrmLite.SqliteTests.csproj --logger 'trx;LogFileName=test-results.trx'
- name: Test Sqlite Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: OrmLite Sqlite Tests
only-summary: 'true'
path: ./ServiceStack.OrmLite/tests/ServiceStack.OrmLite.SqliteTests/TestResults/test-results.trx
reporter: dotnet-trx
- name: Build ServiceStack
working-directory: ServiceStack/build
run: dotnet build ./build.proj
- name: Test ServiceStack.Common
run: dotnet test --framework net8.0 ./ServiceStack/tests/ServiceStack.Common.Tests/ServiceStack.Common.Tests.csproj --logger 'trx;LogFileName=results.trx'
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: ServiceStack.Common Tests
only-summary: 'true'
path: ./ServiceStack/tests/ServiceStack.Common.Tests/TestResults/results.trx
reporter: dotnet-trx
- name: Test ServiceStack.ServiceModels
run: dotnet test --framework net8.0 ./ServiceStack/tests/ServiceStack.ServiceModel.Tests/ServiceStack.ServiceModel.Tests.csproj --logger 'trx;LogFileName=results.trx'
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: ServiceModels Tests
only-summary: 'true'
path: ./ServiceStack/tests/ServiceStack.ServiceModel.Tests/TestResults/results.trx
reporter: dotnet-trx
- name: Test ServiceStack.WebHost Endpoints
env:
PGSQL_CONNECTION: Server=localhost;Port=48303;User Id=postgres;Password=test;Database=test;Pooling=true;MinPoolSize=0;MaxPoolSize=200
MSSQL_CONNECTION: Server=localhost,48501;Database=master;User Id=sa;Password=Test!tesT;MultipleActiveResultSets=True;Encrypt=false;TrustServerCertificate=true;
run: dotnet test --framework net8.0 ./ServiceStack/tests/ServiceStack.WebHost.Endpoints.Tests/ServiceStack.WebHost.Endpoints.Tests.csproj --logger 'trx;LogFileName=results.trx'
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: ServiceStack.WebHost.Endpoints Tests
only-summary: 'true'
path: ./ServiceStack/tests/ServiceStack.WebHost.Endpoints.Tests/TestResults/results.trx
reporter: dotnet-trx
- name: Build Aws
working-directory: ServiceStack.Aws/build
run: dotnet build ./build.proj
- name: Aws Tests
run: dotnet test --framework net8.0 ./ServiceStack.Aws/tests/ServiceStack.Aws.Tests/ServiceStack.Aws.Tests.csproj --logger 'trx;LogFileName=results.trx'
- name: Test Report
uses: dorny/test-reporter@v1
if: (success() || failure()) && steps.test_integration.outcome != 'skipped'
with:
name: Text Tests
path: ./ServiceStack.Aws/tests/ServiceStack.Aws.Tests/TestResults/results.trx
reporter: dotnet-trx
only-summary: 'true'
- name: Build Azure
working-directory: ServiceStack.Azure/build
run: dotnet build ./build.proj
- name: Build Blazor
working-directory: ServiceStack.Blazor/build
run: dotnet build ./build.proj
- name: Build Logging
working-directory: ServiceStack.Logging/build
run: dotnet build ./build.proj
- name: Build Core
working-directory: ServiceStack.Core/build
run: dotnet build ./build.proj
- name: Build Stripe
working-directory: ServiceStack.Stripe/build
run: dotnet build ./build.proj
- name: Stripe Tests
run: dotnet test --framework net8.0 ./ServiceStack.Stripe/tests/ServiceStack.Stripe.Tests/ServiceStack.Stripe.Tests.csproj --logger 'trx;LogFileName=results.trx'
- name: Test Report
uses: dorny/test-reporter@v1
if: (success() || failure()) && steps.test_integration.outcome != 'skipped'
with:
name: Stripe Tests
path: ./ServiceStack.Stripe/tests/ServiceStack.Stripe.Tests/TestResults/results.trx
reporter: dotnet-trx
only-summary: 'true'
nuget-pack:
needs: build-test-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.*'
- name: Rebuild All
working-directory: ./build
run: |
chmod +x ./build-all.sh
chmod +x ../ServiceStack/build/build.sh
chmod +x ../ServiceStack.Aws/build/build.sh
chmod +x ../ServiceStack.Azure/build/build.sh
chmod +x ../ServiceStack.Blazor/build/build.sh
chmod +x ../ServiceStack.Logging/build/build.sh
chmod +x ../ServiceStack.OrmLite/build/build.sh
chmod +x ../ServiceStack.Redis/build/build.sh
chmod +x ../ServiceStack.Stripe/build/build.sh
chmod +x ../ServiceStack.Text/build/build.sh
chmod +x ../ServiceStack.Core/build/build.sh
./build-all.sh
- name: Stage output
working-directory: ./build
run: |
chmod +x ./stage-output.sh
./stage-output.sh
cd staging
export number_of_packages=$(ls -1 | wc -l)
echo "number_of_packages=${number_of_packages}" >> $GITHUB_ENV
- name: Check number of packages
if: env.number_of_packages < 73
run: |
echo "Less packages produced than expected, failing."
exit 1
- uses: actions/upload-artifact@v4
with:
name: ServiceStack Packages
retention-days: 1
path: ./build/staging/*.nupkg