forked from Sylius/Sylius
-
Notifications
You must be signed in to change notification settings - Fork 0
741 lines (614 loc) · 29.5 KB
/
application.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
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
name: Application
on:
push:
tags:
- v1.*
branches-ignore:
- 'dependabot/**'
paths-ignore:
- "adr/**"
- "docs/**"
- "*.md"
pull_request:
paths-ignore:
- "adr/**"
- "docs/**"
- "*.md"
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
jobs:
static-checks:
runs-on: ubuntu-latest
name: "Static checks (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }})"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1"]
symfony: ["^5.4"]
steps:
-
uses: actions/checkout@v2
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-values: date.timezone=Europe/Warsaw, opcache.enable=1, opcache.enable_cli=0, opcache.memory_consumption=512, opcache.max_accelerated_files=65407, opcache.interned_strings_buffer=8, opcache.validate_timestamps=0, opcache.save_comments=1, opcache.fast_shutdown=0
extensions: intl, gd, opcache, mysql, pdo_mysql
tools: symfony, composer-require-checker
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:1.18.5"
composer config extra.symfony.require "${{ matrix.symfony }}"
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-
-
name: Install PHP dependencies
run: composer update --no-interaction --no-scripts
id: end-of-setup
-
name: Validate composer.json
run: composer validate --strict --no-check-version
if: always() && steps.end-of-setup.outcome == 'success'
-
name: Check for security vulnerabilities
run: symfony security:check
if: always() && steps.end-of-setup.outcome == 'success'
-
name: Validate Twig templates
run: bin/console lint:twig src
if: always() && steps.end-of-setup.outcome == 'success'
-
name: Validate Container
run: bin/console lint:container
if: always() && steps.end-of-setup.outcome == 'success'
-
name: Validate Yaml files
run: bin/console lint:yaml src
if: always() && steps.end-of-setup.outcome == 'success'
-
name: Run Psalm
run: vendor/bin/psalm --show-info=false --output-format=github --php-version=${{ matrix.php }}
if: always() && steps.end-of-setup.outcome == 'success'
-
name: Run PHPStan
run: vendor/bin/phpstan analyse
if: always() && steps.end-of-setup.outcome == 'success'
-
name: Run ComposerRequireChecker
run: |
(cat composer.json | jq '.["autoload-dev"]["psr-4"] |= . + {"Sylius\\Behat\\": "src/Sylius/Behat/"}' | jq 'del(.autoload["psr-4"]["Sylius\\Behat\\"])') > _composer.json
mv _composer.json composer.json
composer dump-autoload
composer-require-checker check --config-file=composer-require-checker.json
if: always() && steps.end-of-setup.outcome == 'success'
architecture-tests:
runs-on: ubuntu-latest
name: "Architecture tests (PHPArkitect)"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1"]
steps:
-
uses: actions/checkout@v2
-
name: Run PHPArkitect
uses: docker://phparkitect/arkitect-github-actions
env:
PHP_VERSION: "${{ matrix.php }}"
with:
args: check
if: always() && steps.end-of-setup.outcome == 'success'
classes-specifictions:
runs-on: ubuntu-latest
name: "Classes specifications (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }})"
strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1"]
symfony: ["^5.4"]
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-values: date.timezone=Europe/Warsaw, opcache.enable=1, opcache.enable_cli=0, opcache.memory_consumption=512, opcache.max_accelerated_files=65407, opcache.interned_strings_buffer=8, opcache.validate_timestamps=0, opcache.save_comments=1, opcache.fast_shutdown=0
extensions: intl, gd, opcache, mysql, pdo_mysql
tools: symfony
coverage: none
- name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:1.18.5"
composer config extra.symfony.require "${{ matrix.symfony }}"
- name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-
- name: Install PHP dependencies
run: composer update --no-interaction --no-scripts
id: end-of-setup
- name: Run PHPSpec
run: vendor/bin/phpspec run --ansi --no-interaction -f dot
test-application-without-frontend-postgres:
runs-on: ubuntu-latest
name: "Test non-JS application (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, PostgresSQL ${{ matrix.postgres }})"
strategy:
matrix:
php: ["8.0"]
symfony: ["^5.4"]
postgres: ["13.3"]
env:
APP_ENV: test_cached
DATABASE_URL: "pgsql://postgres:postgres@127.0.0.1/sylius?serverVersion=${{ matrix.postgres }}"
steps:
-
uses: actions/checkout@v2
-
name: Shutdown default MySQL
run: sudo service mysql stop
-
uses: harmon758/postgresql-action@v1
with:
postgresql version: "${{ matrix.postgres }}"
postgresql password: "postgres"
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-values: date.timezone=Europe/Warsaw, opcache.enable=1, opcache.enable_cli=0, opcache.memory_consumption=256, opcache.max_accelerated_files=32531, opcache.interned_strings_buffer=8, opcache.validate_timestamps=0, opcache.save_comments=1, opcache.fast_shutdown=0
extensions: intl, gd, opcache, pgsql, pdo_pgsql
tools: symfony
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.18.5"
composer config extra.symfony.require "${{ matrix.symfony }}"
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-
-
name: Install PHP dependencies
run: composer update --no-interaction --no-scripts
-
name: Dump the environment
run: |
echo "DATABASE_URL=$DATABASE_URL" >> .env.$APP_ENV
composer dump-env $APP_ENV
-
name: Warmup cache
run: bin/console cache:warmup
-
name: Make filesystem readonly
run: chmod -R 555 app bin config docs features src templates tests translations vendor
-
name: Prepare application database
run: |
APP_DEBUG=1 bin/console doctrine:database:create -vvv
bin/console doctrine:schema:update --force -vvv
-
name: Validate Database Schema
run: bin/console doctrine:schema:validate -vvv
test-application-without-frontend-mariadb:
runs-on: ubuntu-latest
name: "Test non-JS application (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MariaDB ${{ matrix.mariadb }})"
strategy:
matrix:
php: ["8.0"]
symfony: ["^5.4"]
mariadb: ["10.4.10"]
env:
APP_ENV: test_cached
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=mariadb-${{ matrix.mariadb }}"
steps:
-
uses: actions/checkout@v2
-
name: Shutdown default MySQL
run: sudo service mysql stop
-
uses: getong/mariadb-action@v1.1
with:
mariadb version: "${{ matrix.mariadb }}"
mysql root password: root
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-values: date.timezone=Europe/Warsaw, opcache.enable=1, opcache.enable_cli=0, opcache.memory_consumption=256, opcache.max_accelerated_files=32531, opcache.interned_strings_buffer=8, opcache.validate_timestamps=0, opcache.save_comments=1, opcache.fast_shutdown=0
extensions: intl, gd, opcache, mysql, pdo_mysql
tools: symfony
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:1.18.5"
composer config extra.symfony.require "${{ matrix.symfony }}"
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-
-
name: Install PHP dependencies
run: composer update --no-interaction --no-scripts
-
name: Dump the environment
run: |
echo "DATABASE_URL=$DATABASE_URL" >> .env.$APP_ENV
composer dump-env $APP_ENV
-
name: Warmup cache
run: bin/console cache:warmup
-
name: Make filesystem readonly
run: chmod -R 555 app bin config docs features src templates tests translations vendor
-
name: Prepare application database
run: |
APP_DEBUG=1 bin/console doctrine:database:create -vvv
bin/console doctrine:migrations:migrate -n -vvv
-
name: Test provided migrations
run: |
bin/console doctrine:migrations:migrate first --no-interaction
bin/console doctrine:migrations:migrate latest --no-interaction
-
name: Validate Database Schema
run: bin/console doctrine:schema:validate -vvv
-
name: Test installer
run: bin/console sylius:install --no-interaction -vvv
continue-on-error: true
-
name: Load fixtures
run: bin/console sylius:fixtures:load default --no-interaction
continue-on-error: true
-
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always
continue-on-error: true
-
name: Run CLI Behat
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" --rerun
continue-on-error: true
-
name: Run non-JS Behat
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --rerun
continue-on-error: true
-
name: Upload Behat logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Behat logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }})"
path: etc/build/
if-no-files-found: ignore
continue-on-error: true
test-application-without-frontend-mysql:
runs-on: ubuntu-latest
name: "Test non-JS application (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }})"
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1"]
symfony: ["^5.4"]
node: ["14.x", "16.x"]
mysql: ["5.7", "8.0"]
twig: ["3.x"]
include:
-
php: "8.0"
symfony: "^5.4"
node: "14.x"
twig: "2.x"
mysql: "5.7"
env:
APP_ENV: test_cached
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
steps:
-
uses: actions/checkout@v2
-
name: Shutdown default MySQL
run: sudo service mysql stop
-
name: Setup MySQL
uses: mirromutth/mysql-action@v1.1
with:
mysql version: "${{ matrix.mysql }}"
mysql root password: "root"
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-values: date.timezone=Europe/Warsaw, opcache.enable=1, opcache.enable_cli=0, opcache.memory_consumption=512, opcache.max_accelerated_files=65407, opcache.interned_strings_buffer=8, opcache.validate_timestamps=0, opcache.save_comments=1, opcache.fast_shutdown=0
extensions: intl, gd, opcache, mysql, pdo_mysql
tools: symfony
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:1.18.5"
composer config extra.symfony.require "${{ matrix.symfony }}"
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-
-
name: Restrict Twig version
if: matrix.twig != ''
run: |
composer require "twig/twig:${{ matrix.twig }}" --no-update --no-scripts --no-interaction
-
name: Install PHP dependencies
run: composer update --no-interaction --no-scripts
-
name: Dump the environment
run: |
echo "DATABASE_URL=$DATABASE_URL" >> .env.$APP_ENV
composer dump-env $APP_ENV
-
name: Warmup cache
run: bin/console cache:warmup
-
name: Make filesystem readonly
run: chmod -R 555 app bin config docs features src templates tests translations vendor
-
name: Prepare application database
run: |
APP_DEBUG=1 bin/console doctrine:database:create -vvv
bin/console doctrine:migrations:migrate -n -vvv
-
name: Test provided migrations
run: |
bin/console doctrine:migrations:migrate first --no-interaction
bin/console doctrine:migrations:migrate latest --no-interaction
-
name: Validate Database Schema
run: bin/console doctrine:schema:validate -vvv
-
name: Test installer
run: bin/console sylius:install --no-interaction -vvv
-
name: Load fixtures
run: bin/console sylius:fixtures:load default --no-interaction
-
name: Run PHPUnit
run: |
bin/console cache:pool:clear cache.global_clearer
vendor/bin/phpunit --debug
-
name: Run CLI Behat
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" --rerun
-
name: Run non-JS Behat
run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --rerun
-
name: Upload Behat logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Behat logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }})"
path: etc/build/
if-no-files-found: ignore
test-application-with-frontend:
runs-on: ubuntu-latest
name: "Test JS application (PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }})"
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
php: ["8.0", "8.1"]
symfony: ["^5.4"]
node: ["14.x", "16.x"]
mysql: ["5.7", "8.0"]
env:
APP_ENV: test_cached
DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
steps:
-
uses: actions/checkout@v2
-
name: Shutdown default MySQL
run: sudo service mysql stop
-
name: Setup MySQL
uses: mirromutth/mysql-action@v1.1
with:
mysql version: "${{ matrix.mysql }}"
mysql root password: "root"
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-values: date.timezone=Europe/Warsaw, opcache.enable=1, opcache.enable_cli=0, opcache.memory_consumption=512, opcache.max_accelerated_files=65407, opcache.interned_strings_buffer=8, opcache.validate_timestamps=0, opcache.save_comments=1, opcache.fast_shutdown=0
extensions: intl, gd, opcache, mysql, pdo_mysql
tools: symfony
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:1.18.5"
composer config extra.symfony.require "${{ matrix.symfony }}"
-
name: Install certificates
run: symfony server:ca:install
-
name: Run Chrome Headless
run: google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' https://127.0.0.1 > /dev/null 2>&1 &
-
name: Get Composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name: Cache Composer
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-
-
name: Install PHP dependencies
run: composer update --no-interaction --no-scripts
-
name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "${{ matrix.node }}"
-
name: Get Yarn cache directory
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
-
name: Cache Yarn
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-yarn-
-
name: Install JS dependencies
run: yarn install
-
name: Validate Yarn packages
run: yarn check
-
name: Dump the environment
run: |
echo "DATABASE_URL=$DATABASE_URL" >> .env.$APP_ENV
composer dump-env $APP_ENV
-
name: Warmup cache
run: bin/console cache:warmup
-
name: Run webserver
run: symfony server:start --port=8080 --dir=public --daemon
-
name: Prepare application database
run: |
APP_DEBUG=1 bin/console doctrine:database:create -vvv
bin/console doctrine:migrations:migrate -n -vvv
-
name: Validate Database Schema
run: bin/console doctrine:schema:validate -vvv
-
name: Build assets
run: |
bin/console assets:install public -vvv
yarn build
-
name: Make filesystem readonly
run: chmod -R 555 app bin config docs features src templates tests translations vendor
-
name: Run JS Behat
run: |
bin/console cache:pool:clear cache.global_clearer
vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --rerun
-
name: Upload Behat logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Behat logs (JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }})"
path: etc/build/
if-no-files-found: ignore
notify-about-build-failure:
runs-on: ubuntu-latest
if: failure() && (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release')
needs: [static-checks, test-application-without-frontend-mysql, test-application-without-frontend-postgres, test-application-without-frontend-mariadb, test-application-with-frontend]
name: "Notify about build failure"
timeout-minutes: 5
steps:
-
name: "Process data"
id: process-data
shell: bash
run: |
echo "::set-output name=branch::$(echo ${{ github.ref }} | sed 's/refs\/heads\///g' | sed 's/refs\/tags\///g')"
echo "::set-output name=sha::$(echo ${{ github.sha }} | cut -c 1-12)"
-
name: "Notify on Slack"
uses: edge/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: env.SLACK_WEBHOOK_URL != null
with:
channel: "#builds"
username: "GitHub Actions"
text: |
*<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ${{ github.workflow }} #${{ github.run_number }} build on ${{ github.repository }} repository has failed for ${{ steps.process-data.outputs.branch }} branch.>*
${{ needs.static-checks.result == 'success' && ':+1:' || ':x:' }} Static checks
${{ needs.test-application-without-frontend.result == 'success' && ':+1:' || ':x:' }} Test non-JS application
${{ needs.test-application-with-frontend.result == 'success' && ':+1:' || ':x:' }} Test JS application
_ _ _ _ _ _ _
color: "danger"
fields: |
[
{ "title": "Repository", "value": "<https://github.com/${{ github.repository }} | ${{ github.repository }}>", "short": true },
{ "title": "Action", "value": "<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ${{ github.workflow }} #${{ github.run_number }}>", "short": true },
{ "title": "Reference", "value": "<https://github.com/${{ github.repository }}/tree/${{ steps.process-data.outputs.branch }} | ${{ steps.process-data.outputs.branch }}>", "short": true },
{ "title": "Commit", "value": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }} | ${{ steps.process-data.outputs.sha }}>", "short": true },
{ "title": "Event", "value": "${{ github.event_name }}", "short": true }
]