-
Notifications
You must be signed in to change notification settings - Fork 600
657 lines (575 loc) · 22.2 KB
/
ci.yml
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
name: PR Continuous Integration
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Ensure that only one instance of this workflow is running per Pull Request
cancel-in-progress: true # Cancel any previous runs of this workflow
jobs:
run_rubocop:
runs-on: ubuntu-22.04
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
- uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: 3.4
- run: bundle
- run: rubocop
unit_tests:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
CI_FOR_PR: true
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- "3306:3306"
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.1]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
# - curl is needed for Curb
# - xslt is needed for older Nokogiris, RUBY_VERSION < 2.5
# - sasl is needed for memcached
- name: Install OS packages
run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libcurl4-nss-dev libsasl2-dev libxslt1-dev
- name: Install Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Set up mini-envs for ruby version
uses: ./.github/actions/variable-mapper
with:
key: ${{ matrix.ruby-version }}
map: |
{
"2.4.10": {
"rails": "norails,rails42,rails52"
},
"3.4.1": {
"rails": "norails,rails61,rails72,rails80"
}
}
- if: matrix.ruby-version == '2.4.10'
name: Prepare mysql directory
run: sudo chown -R $USER /usr/local
- if: matrix.ruby-version == '2.4.10'
name: Cache mysql55
id: mysql55-cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # tag v4.0.2
with:
path: /usr/local/mysql55
key: mysql55-install
- if: steps.mysql55-cache.outputs.cache-hit != 'true' && matrix.ruby-version == '2.4.10'
name: Install mysql55
run: sudo ./test/script/install_mysql55
- name: Setup bundler
run: ./.github/workflows/scripts/setup_bundler
env:
RUBY_VERSION: ${{ matrix.ruby-version }}
RAILS_VERSION: ${{ env.rails }}
CI_FOR_PR: true
- name: Run Unit Tests
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # tag v3.0.0
with:
timeout_minutes: 30
max_attempts: 2
command: bundle exec rake test:env[${{ env.rails }}]
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
VERBOSE_TEST_OUTPUT: true
COVERAGE: true
CI_FOR_PR: true
- name: Save coverage results
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: coverage-report-unit-tests-${{ matrix.ruby-version }}-${{ env.rails }}
path: lib/coverage_*/.resultset.json
multiverse:
needs: run_rubocop
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
multiverse: [agent, ai, background, background_2, frameworks, httpclients, httpclients_2, rails, rest]
ruby-version: [2.4.10, 3.4.1]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
# - curl is needed for Curb
# - xslt is needed for older Nokogiris, RUBY_VERSION < 2.5
# - sasl is needed for memcached
- name: Install OS packages
run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libcurl4-nss-dev libsasl2-dev libxslt1-dev
- name: Install Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Setup bundler
run: ./.github/workflows/scripts/setup_bundler
env:
RUBY_VERSION: ${{ matrix.ruby-version }}
- name: Run Multiverse Tests
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # tag v3.0.0
with:
timeout_minutes: 60
max_attempts: 2
command: bundle exec rake test:multiverse[group="${{ matrix.multiverse }}"]
env:
VERBOSE_TEST_OUTPUT: true
SERIALIZE: 1
COVERAGE: true
CI_FOR_PR: true
- name: Annotate errors
if: ${{ failure() }}
uses: ./.github/actions/annotate
- name: Save coverage results
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: coverage-report-multiverse-${{ matrix.ruby-version }}-${{ matrix.multiverse }}
path: lib/coverage_*/.resultset.json
retention-days: 2
- name: Generate gem manifest
run: rake test:multiverse:gem_manifest
- name: Save gem manifest
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: gem_manifest_${{ matrix.ruby-version }}_${{ matrix.multiverse }}.json
path: gem_manifest_${{ matrix.ruby-version }}_${{ matrix.multiverse }}.json
retention-days: 2
multiverse_services_1:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
elasticsearch7:
image: elasticsearch:7.16.2
env:
discovery.type: single-node
ports:
- 9200:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
elasticsearch8:
image: elasticsearch:8.13.0
env:
discovery.type: single-node
xpack.security.enabled: false
ports:
- 9250:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
mongodb:
image: ${{ contains(fromJson('["2.4.10"]'), matrix.ruby-version) && 'mongo:5.0.11' || 'mongo:latest' }}
ports:
- 27017:27017
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672
options: >-
--health-cmd "rabbitmq-diagnostics -q check_port_connectivity"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.1]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
# - curl is needed for Curb
# - xslt is needed for older Nokogiris, RUBY_VERSION < 2.5
# - sasl is needed for memcached
- name: Install OS packages
run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libcurl4-nss-dev libsasl2-dev libxslt1-dev
- name: Install Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Setup bundler
run: ./.github/workflows/scripts/setup_bundler
env:
RUBY_VERSION: ${{ matrix.ruby-version }}
- name: Run Multiverse Tests
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # tag v3.0.0
with:
timeout_minutes: 60
max_attempts: 2
command: bundle exec rake test:multiverse[group="services_1"]
env:
VERBOSE_TEST_OUTPUT: true
SERIALIZE: 1
COVERAGE: true
CI_FOR_PR: true
- name: Annotate errors
if: ${{ failure() }}
uses: ./.github/actions/annotate
- name: Save coverage results
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: coverage-report-multiverse-${{ matrix.ruby-version }}-services_1
path: lib/coverage_*/.resultset.json
retention-days: 2
- name: Generate gem manifest
run: rake test:multiverse:gem_manifest
- name: Save gem manifest
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: gem_manifest_${{ matrix.ruby-version }}_services_1.json
path: gem_manifest_${{ matrix.ruby-version }}_services_1.json
retention-days: 2
multiverse_services_2:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
kafka:
image: bitnami/kafka
ports:
- 9092:9092
options: >-
--health-cmd "kafka-broker-api-versions.sh --version"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
memcached:
image: memcached:latest
ports:
- 11211:11211
options: >-
--health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/udp/127.0.0.1/11211'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.1]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
# - curl is needed for Curb
# - xslt is needed for older Nokogiris, RUBY_VERSION < 2.5
# - sasl is needed for memcached
- name: Install OS packages
run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libcurl4-nss-dev libsasl2-dev libxslt1-dev
- name: Install Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Setup bundler
run: ./.github/workflows/scripts/setup_bundler
env:
RUBY_VERSION: ${{ matrix.ruby-version }}
- name: Run Multiverse Tests
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # tag v3.0.0
with:
timeout_minutes: 60
max_attempts: 2
command: bundle exec rake test:multiverse[group="services_2"]
env:
VERBOSE_TEST_OUTPUT: true
SERIALIZE: 1
COVERAGE: true
CI_FOR_PR: true
- name: Annotate errors
if: ${{ failure() }}
uses: ./.github/actions/annotate
- name: Save coverage results
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: coverage-report-multiverse-${{ matrix.ruby-version }}-services_2
path: lib/coverage_*/.resultset.json
retention-days: 2
- name: Generate gem manifest
run: rake test:multiverse:gem_manifest
- name: Save gem manifest
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: gem_manifest_${{ matrix.ruby-version }}_services_2.json
path: gem_manifest_${{ matrix.ruby-version }}_services_2.json
retention-days: 2
multiverse_services_kafka:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
kafka:
image: bitnami/kafka
ports:
- 9092:9092
options: >-
--health-cmd "kafka-broker-api-versions.sh --version"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
zookeeper:
image: bitnami/zookeeper
ports:
- 2181:2181
env:
ALLOW_ANONYMOUS_LOGIN: yes
options: >-
--health-cmd "echo mntr | nc -w 2 -q 2 localhost 2181"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.1]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
# - curl is needed for Curb
# - xslt is needed for older Nokogiris, RUBY_VERSION < 2.5
# - sasl is needed for memcached
- name: Install OS packages
run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libcurl4-nss-dev libsasl2-dev libxslt1-dev
- name: Install Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Setup bundler
run: ./.github/workflows/scripts/setup_bundler
env:
RUBY_VERSION: ${{ matrix.ruby-version }}
- name: Run Multiverse Tests
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # tag v3.0.0
with:
timeout_minutes: 60
max_attempts: 2
command: bundle exec rake test:multiverse[group="services_kafka"]
env:
VERBOSE_TEST_OUTPUT: true
SERIALIZE: 1
COVERAGE: true
CI_FOR_PR: true
- name: Annotate errors
if: ${{ failure() }}
uses: ./.github/actions/annotate
- name: Save coverage results
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: coverage-report-multiverse-${{ matrix.ruby-version }}-services_kafka
path: lib/coverage_*/.resultset.json
retention-days: 2
- name: Generate gem manifest
run: rake test:multiverse:gem_manifest
- name: Save gem manifest
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: gem_manifest_${{ matrix.ruby-version }}_services_kafka.json
path: gem_manifest_${{ matrix.ruby-version }}_services_kafka.json
retention-days: 2
multiverse_services_mysql_pg:
needs: run_rubocop
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- 3306
postgres:
image: postgres:latest
env:
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
ruby-version: [2.4.10, 3.4.1]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
# - curl is needed for Curb
# - xslt is needed for older Nokogiris, RUBY_VERSION < 2.5
# - sasl is needed for memcached
- name: Install OS packages
run: sudo apt-get update; sudo apt-get install -y --no-install-recommends libcurl4-nss-dev libsasl2-dev libxslt1-dev
- name: Install Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: ${{ matrix.ruby-version }}
# This allows the cache in the following step to be able to write files to the directory needed for mysql
- if: matrix.ruby-version == '2.4.10'
name: Prepare mysql directory
run: sudo chown -R $USER /usr/local
- if: matrix.ruby-version == '2.4.10'
name: Cache mysql55
id: mysql55-cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # tag v4.0.2
with:
path: /usr/local/mysql55
key: mysql55-install
- if: steps.mysql55-cache.outputs.cache-hit != 'true' && matrix.ruby-version == '2.4.10'
name: Install mysql55
run: sudo ./test/script/install_mysql55
- name: Setup bundler
run: ./.github/workflows/scripts/setup_bundler
env:
RUBY_VERSION: ${{ matrix.ruby-version }}
- name: Wait for/Check Mysql
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # tag v3.0.0
with:
timeout_minutes: 1
max_attempts: 20
command: |
mysql --host 127.0.0.1 --port ${{ job.services.mysql.ports[3306] }} -uroot -proot -e "SHOW GRANTS FOR 'root'@'localhost'";
if [[ $? != 0 ]]; then
sleep 1;
fi
- name: Run Multiverse Tests
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # tag v3.0.0
with:
timeout_minutes: 60
max_attempts: 2
command: bundle exec rake test:multiverse[group="services_mysql_pg"]
env:
VERBOSE_TEST_OUTPUT: true
MYSQL_PASSWORD: root
DB_PASSWORD: root
DB_PORT: ${{ job.services.mysql.ports[3306] }}
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
MYSQL_HOST: 127.0.0.1
POSTGRES_USERNAME: postgres
POSTGRES_PASSWORD: password
SERIALIZE: 1
COVERAGE: true
CI_FOR_PR: true
- name: Annotate errors
if: ${{ failure() }}
uses: ./.github/actions/annotate
- name: Save coverage results
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: coverage-report-multiverse-${{ matrix.ruby-version }}-service_mysql_pg
path: lib/coverage_*/.resultset.json
retention-days: 2
- name: Generate gem manifest
run: rake test:multiverse:gem_manifest
- name: Save gem manifest
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: gem_manifest_${{ matrix.ruby-version }}_service_mysql_pg.json
path: gem_manifest_${{ matrix.ruby-version }}_service_mysql_pg.json
retention-days: 2
infinite_tracing:
needs: run_rubocop
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ruby-version: [2.7.8, 3.4.1]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
- name: Install Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Bundle
run: bundle install
- name: Run Multiverse Tests
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # tag v3.0.0
with:
timeout_minutes: 15
max_attempts: 2
command: bundle exec rake test:multiverse[group=infinite_tracing]
env:
VERBOSE_TEST_OUTPUT: true
SERIALIZE: 1
COVERAGE: true
CI_FOR_PR: true
- name: Annotate errors
if: ${{ failure() }}
uses: ./.github/actions/annotate
- name: Save coverage results
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: coverage-report-infinite-tracing-${{ matrix.ruby-version }}-infinite_tracing
path: lib/coverage_*/.resultset.json
simplecov:
needs: [unit_tests, multiverse, infinite_tracing]
runs-on: ubuntu-22.04
if: github.event.pull_request.head.repo.full_name == github.repository
permissions:
pull-requests: write
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag v4.1.7
- uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4 # tag v1.207.0
with:
ruby-version: 3.4
- run: bundle
- name: Download all workflow run artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # tag v4.1.8
- name: Collate Coverage Results
run: bundle exec rake coverage:report
- name: Upload coverage results
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # tag v4.3.4
with:
name: coverage-report-combined-${{ matrix.ruby-version }}
path: lib/coverage_results
retention-days: 2
- name: Simplecov Report
uses: ./.github/actions/simplecov-report
with:
token: ${{ secrets.GITHUB_TOKEN }}
resultPath: lib/coverage_results/.last_run.json
failedThreshold: 93.5
failedThresholdBranch: 0