-
Notifications
You must be signed in to change notification settings - Fork 292
747 lines (691 loc) · 25.7 KB
/
Copy pathci.yml
File metadata and controls
747 lines (691 loc) · 25.7 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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
name: CI
# CI build for Brighter
# It creates a package on the github nuger feed for this project
# We run tests for transports as separate jobs to create greater visibility of failure, and to parallelize
# HINT: If you need to debug a config issue, tmate allows you to hop on to the server, check in the build
# logs for the SSH address to let you hop onto the box via tmate. It will timeout and not connect if left too long
# - name: Debugging with tmate
# uses: mxschmitt/action-tmate@v3.1
on:
push:
branches: [ master, release/9X ]
tags:
- '*.*.*'
pull_request:
branches: [ master, release/9X ]
env:
# Stop wasting time caching packages
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending usage data to Microsoft
DOTNET_CLI_TELEMETRY_OPTOUT: true
# Don't show a logo on first run of CLI
DOTNET_NOLOGO: true
# Enable color on terminal
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
FORCE_COLOR: 3
TERM: xterm
# GitHub Packages Feed settings
GITHUB_FEED: https://nuget.pkg.github.com/
GITHUB_USER: iancooper
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
# Increased from 30 to 40 minutes to prevent cancellations during test execution.
# The build includes compilation + running 3 test suites (Core.Tests, Extensions.Tests,
# Transforms.Adaptors.Tests) which can take 20-30 minutes in slower CI environments.
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- run: dotnet --info
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/cache@v6
with:
path: ~/.nuget/packages
key: Linux-nuget-${{ hashFiles('**/Directory.Packages.props') }}
restore-keys: |
Linux-nuget-
- name: Build
run: dotnet build --configuration Release
- name: Core Tests
run: |
dotnet test tests/Paramore.Brighter.Core.Tests/Paramore.Brighter.Core.Tests.csproj --filter "Fragile!=CI" -c Release --logger GitHubActions --no-restore --no-build
dotnet test tests/Paramore.Brighter.Extensions.Tests/Paramore.Brighter.Extensions.Tests.csproj -c Release --no-restore --logger GitHubActions --no-build
dotnet test tests/Paramore.Brighter.Transforms.Adaptors.Tests/Paramore.Brighter.Transforms.Adaptors.Tests.csproj -c Release --no-restore --logger GitHubActions --no-build
- name: Upload packages as artifacts
uses: actions/upload-artifact@v7
with:
name: nuget packages
path: "**/*.nupkg"
- name: Push to GitHub Feed
if: ${{ github.event_name != 'pull_request' }}
run: dotnet nuget push **/*.nupkg --source https://nuget.pkg.github.com/${REPOSITORY_OWNER}/index.json --api-key ${GITHUB_TOKEN} --skip-duplicate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_OWNER: ${{ github.repository_owner }}
release:
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [build]
steps:
- uses: actions/download-artifact@v8
with:
name: nuget packages
- name: Push generated package to NuGet
run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_KEY }} --skip-duplicate
memory:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [build]
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: In Memory Transport Tests
run: dotnet test ./tests/Paramore.Brighter.InMemory.Tests/Paramore.Brighter.InMemory.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
hangfire:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [ build ]
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Hangfire Tests
run: dotnet test ./tests/Paramore.Brighter.Hangfire.Tests/Paramore.Brighter.Hangfire.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
quartz:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [ build ]
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Quartz Tests
run: dotnet test ./tests/Paramore.Brighter.Quartz.Tests/Paramore.Brighter.Quartz.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
tickerq:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [ build ]
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: TickerQ Tests
run: dotnet test ./tests/Paramore.Brighter.TickerQ.Tests/Paramore.Brighter.TickerQ.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
redis-ci:
runs-on: ubuntu-latest
# Increased from 5 to 8 minutes to accommodate slower CI environments
# and service initialization time. This provides adequate buffer without
# being excessive for typical test execution (P95 < 5 min observed).
timeout-minutes: 8
needs: [build]
services:
redis:
image: redis:latest
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Redis Transport Tests
run: dotnet test ./tests/Paramore.Brighter.Redis.Tests/Paramore.Brighter.Redis.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
mqtt-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [build]
services:
mosquitto:
image: efrecon/mosquitto:latest
ports:
- 1883:1883
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: MQTT Transport Tests
run: dotnet test ./tests/Paramore.Brighter.MQTT.Tests/Paramore.Brighter.MQTT.Tests.csproj --filter "Category=MQTT&Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
rabbitmq-async-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [build]
services:
rabbitmq:
image: brightercommand/rabbitmq:4.2-management-delay
ports:
- 5672:5672
# needed because the rabbitmq container does not provide a healthcheck
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: RMQ Async Transport Tests
run: dotnet test ./tests/Paramore.Brighter.RMQ.Async.Tests/Paramore.Brighter.RMQ.Async.Tests.csproj --filter "Fragile!=CI&Requires!=Docker-mTLS" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
rabbitmq-sync-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [build]
services:
rabbitmq:
image: brightercommand/rabbitmq:3.13-management-delay
ports:
- 5672:5672
# needed because the rabbitmq container does not provide a healthcheck
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: RMQ Sync Transport Tests
run: dotnet test ./tests/Paramore.Brighter.RMQ.Sync.Tests/Paramore.Brighter.RMQ.Sync.Tests.csproj --filter "Fragile!=CI&Requires!=Docker-mTLS" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
kafka-ci:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: [build]
env:
CONFLUENT_BOOSTRAP_SERVER: ${{ secrets.CONFLUENT_BOOSTRAP_SERVER }}
CONFLUENT_SASL_PASSWORD: ${{ secrets.CONFLUENT_SASL_PASSWORD }}
CONFLUENT_SASL_USERNAME: ${{ secrets.CONFLUENT_SASL_USERNAME }}
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
ports:
- 2181:2181
env:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ALLOW_ANONYMOUS_LOGIN: yes
kafka:
image: confluentinc/cp-enterprise-kafka:latest
ports:
- 9092:9092
env:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_DELETE_TOPIC_ENABLE: "true"
schema-registry:
image: confluentinc/cp-schema-registry:latest
ports:
- 8081:8081
env:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'kafka:29092'
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
steps:
- name: Install kcat
run: |
sudo apt-get update && sudo apt-get install -y kcat
- name: Wait for Kafka to be ready
run: |
echo "Waiting for Kafka to be ready..."
max_attempts=30
attempt=0
while [ $attempt -lt $max_attempts ]; do
if kcat -b localhost:9092 -L > /dev/null 2>&1; then
echo "Kafka is ready!"
break
fi
attempt=$((attempt + 1))
echo "Attempt $attempt/$max_attempts: Kafka not ready yet, waiting 2 seconds..."
sleep 2
done
if [ $attempt -eq $max_attempts ] && ! kcat -b localhost:9092 -L > /dev/null 2>&1; then
echo "Kafka failed to become ready after $max_attempts attempts"
exit 1
fi
- name: Checkout code
uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Kafka Transport Tests
run: dotnet test ./tests/Paramore.Brighter.Kafka.Tests/Paramore.Brighter.Kafka.Tests.csproj --filter "Category=Kafka&Category!=Confluent&Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
postgres-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [build]
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: brightertests
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Postgres Tests
run: dotnet test ./tests/Paramore.Brighter.PostgresSQL.Tests/Paramore.Brighter.PostgresSQL.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
sqlserver-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [build]
services:
sqlserver:
image: mcr.microsoft.com/azure-sql-edge
ports:
- 11433:1433
env:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Password123!
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: MSSQL Tests
run: dotnet test ./tests/Paramore.Brighter.MSSQL.Tests/Paramore.Brighter.MSSQL.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
mysql-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [build]
services:
mariadb:
image: mariadb:latest
ports:
- 3306:3306
env:
MYSQL_DATABASE: BrighterTests
MYSQL_ROOT_PASSWORD: root
options: --health-cmd="healthcheck.sh --su-mysql --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=10
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Verify MariaDB connection
env:
PORT: ${{ job.services.mariadb.ports[3306] }}
run: |
while ! mysqladmin ping -h"127.0.0.1" -P"$PORT" --silent; do
sleep 1
done
- name: MySQL Tests
run: dotnet test ./tests/Paramore.Brighter.MySQL.Tests/Paramore.Brighter.MySQL.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dynamo-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [build]
services:
dynamo:
image: dwmkerr/dynamodb
ports:
- 8000:8000
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: DynamoDB Tests
run: |
dotnet test ./tests/Paramore.Brighter.DynamoDB.Tests/Paramore.Brighter.DynamoDB.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test ./tests/Paramore.Brighter.DynamoDB.V4.Tests/Paramore.Brighter.DynamoDB.V4.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
aws-mock-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: build
env:
AWS_SERVICE_URL: http://localhost:4566
services:
floci:
image: floci/floci:1.5.19
ports:
- 4566:4566
options: >-
--health-cmd "curl -sf http://localhost:4566/_localstack/health"
--health-interval 5s
--health-timeout 3s
--health-retries 10
--health-start-period 5s
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # Required to fetch the Git tags
filter: tree:0
show-progress: false
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- uses: actions/cache@v6
with:
path: ~/.nuget/packages
key: Linux-nuget-${{ hashFiles('**/Directory.Packages.props') }}
restore-keys: |
Linux-nuget-
- name: AWS Tests
run: |
dotnet test ./tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test ./tests/Paramore.Brighter.AWS.V4.Tests/Paramore.Brighter.AWS.V4.Tests.csproj --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
aws-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
if: |
(github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master')) ||
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork)
needs: [build]
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2
AWS_DEFAULT_OUTPUT: json
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: AWS SNS, SQS and S3 Tests
run: |
dotnet test ./tests/Paramore.Brighter.AWS.Tests/Paramore.Brighter.AWS.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test ./tests/Paramore.Brighter.AWS.V4.Tests/Paramore.Brighter.AWS.V4.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
aws-scheduler-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
if: |
(github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master')) ||
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork)
needs: [build]
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-west-2
AWS_DEFAULT_OUTPUT: json
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: Scheduler Tests
run: |
dotnet test ./tests/Paramore.Brighter.AWSScheduler.Tests/Paramore.Brighter.AWSScheduler.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
dotnet test ./tests/Paramore.Brighter.AWSScheduler.V4.Tests/Paramore.Brighter.AWSScheduler.V4.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
sqlite-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [ build ]
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Sqlite Tests
run: dotnet test ./tests/Paramore.Brighter.Sqlite.Tests/Paramore.Brighter.Sqlite.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
azure-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
if: |
(github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master')) ||
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork)
needs: [build]
env:
BrighterTestsASBConnectionString: ${{ secrets.BRIGHTERTESTS_ASB_CONNECTION_STRING }}
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: Azure Tests
run: dotnet test ./tests/Paramore.Brighter.AzureServiceBus.Tests/Paramore.Brighter.AzureServiceBus.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
mongodb-ci:
runs-on: ubuntu-latest
timeout-minutes: 8
needs: [build]
services:
mongo:
image: mongo
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: brighter
options: >-
--health-cmd "mongosh --eval 'db.runCommand(\"ping\").ok'"
--health-interval 20s
--health-timeout 10s
--health-retries 15
steps:
- uses: actions/checkout@v7
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
- name: Install dependencies
run: dotnet restore
- name: MongoDB Tests
run: dotnet test ./tests/Paramore.Brighter.MongoDb.Tests/Paramore.Brighter.MongoDb.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n
gcp-ci:
runs-on: ubuntu-latest
timeout-minutes: 20
needs: [build]
if: |
(github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master')) ||
(github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork)
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # Required to fetch the Git tags
filter: tree:0
show-progress: false
- name: Google Cloud auth
uses: google-github-actions/auth@v3
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v3
with:
version: '>= 363.0.0'
- name: Setup dotnet
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
10.0.x
- name: Install dependencies
run: dotnet restore
- name: GCP Tests
run: dotnet test ./tests/Paramore.Brighter.Gcp.Tests/Paramore.Brighter.Gcp.Tests.csproj --filter "Category!=Spanner&Category!=GcpPubSubStream&Category!=GcpPubSubStreamOrdering&Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --logger GitHubActions --blame -v n --blame-hang-timeout 15min --framework net10.0
# TODO: Rafael Andrade is working on how to run RocketMQ on GHA
# rocketmq-ci:
# runs-on: ubuntu-latest
# timeout-minutes: 5
# needs: [build]
# services:
# rocketmq-namesrv:
# image: apache/rocketmq
# ports:
# - 9876:9876
# options: >-
# --name rmqnamesrv
# --hostname rmqnamesrv
# --health-cmd "netstat -an | grep 9876"
# --health-interval 20s
# --health-timeout 10s
# --health-retries 10
#
# rocketmq-broker:
# image: apache/rocketmq
# ports:
# - 10909:10909
# - 10911:10911
# - 10912:10912
# options: >-
# --name rmqbroker
# --hostname rmqbroker
# --link rmqnamesrv:rmqnamesrv
# --health-cmd "netstat -an | grep 10911"
# --health-interval 20s
# --health-timeout 10s
# --health-retries 10
# env:
# NAMESRV_ADDR: "rocketmq-namesrv:9876"
# BROKER_CLUSTER_NAME: "DefaultCluster"
# BROKER_NAME: "broker-a"
# BROKER_ID: "0"
# AUTO_CREATE_TOPIC_ENABLE: "true" # Auto-create topics
#
# steps:
# - uses: actions/checkout@v7
# with:
# fetch-depth: 0 # Required to fetch the Git tags
# filter: tree:0
# show-progress: false
#
# - name: Wait for RocketMQ to be ready
# run: |
# sleep 15
# echo "RocketMQ should be ready now"
#
# - name: Setup dotnet
# uses: actions/setup-dotnet@v5
# with:
# dotnet-version: |
# 8.0.x
# 9.0.x
#
# - name: Install dependencies
# run: dotnet restore
#
# - name: RocketMQ Tests
# run: dotnet test ./tests/Paramore.Brighter.RocketMQ.Tests/Paramore.Brighter.RocketMQ.Tests.csproj --filter "Fragile!=CI" --configuration Release --logger "console;verbosity=normal" --blame -v n