-
Notifications
You must be signed in to change notification settings - Fork 130
771 lines (694 loc) · 40.7 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
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
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
name: B2C-CI
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
validation:
name: "Static analysis"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-version: [
'8.1',
'8.2'
]
env:
APPLICATION_ENV: ci.mysql
APPLICATION_STORE: DE
PROJECT: suite
services:
redis:
image: redis
ports:
- 6379/tcp
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: Configure sysctl limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 7.10.0
port: 9200
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl, pdo_mysql, redis
tools: composer:v2
- name: Composer get cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Composer validate
run: composer validate
- name: Composer version
run: composer --version
- name: Composer install
run: composer install
- name: Generate transfer objects
run: vendor/bin/console transfer:generate
- name: Generate transfer databuilder objects
run: vendor/bin/console transfer:databuilder:generate
- name: Propel install
run: |
vendor/bin/console propel:schema:copy
vendor/bin/console propel:model:build
vendor/bin/console transfer:entity:generate
- name: Setup search
run: vendor/bin/console setup:search
- name: Codecept build
run: vendor/bin/codecept build --ansi
- name: Generate autocompletion files
run: vendor/bin/console dev:ide-auto-completion:generate
- name: Generate rest API dcoumentation
run: vendor/bin/console rest-api:generate:documentation
- name: Frontend install-dependencies
run: |
vendor/bin/console frontend:project:install-dependencies -vvv
- name: Install NPM packages
run: |
sudo npm i --location=global --unsafe-perm speccy@0.11.0
- name: Speccy lint Glue specification
run: speccy lint src/Generated/Glue/Specification/spryker_rest_api.schema.yml --rules=default
- name: Style lint
run: npm run yves:stylelint
- name: ES lint
run: npm run yves:lint
- name: Front-end Formatter
run: npm run formatter
- name: Validate propel files
run: |
vendor/bin/console propel:schema:validate
vendor/bin/console propel:schema:validate-xml-names
- name: Validate transfer files
run: vendor/bin/console transfer:validate
- name: Run CodeStyle checks
run: vendor/bin/console code:sniff:style
- name: Run Architecture rules
run: vendor/bin/phpmd src/ text vendor/spryker/architecture-sniffer/src/ruleset.xml --minimumpriority 2
- name: Run PHPStan
run: vendor/bin/phpstan analyze -l 6 -c phpstan.neon src/
- name: Run Evaluator for release branches
run: vendor/bin/evaluator evaluate --format=compact
if: github.event.pull_request.base.ref == 'master' && startsWith(github.event.pull_request.head.ref, 'release-')
- name: Run Evaluator for all branches
run: vendor/bin/evaluator evaluate --exclude-checkers=SPRYKER_DEV_PACKAGES_CHECKER --format=compact
php-82-mariadb-glue-alpine:
name: "PHP 8.2 / MariaDB / Glue / Alpine"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot deploy.ci.api.mariadb.yml -v
docker/sdk up -t -v
docker/sdk testing codecept fixtures
docker/sdk testing console queue:worker:start --stop-when-empty
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.api.yml
php-82-postgresql-glue-alpine:
name: "PHP 8.2 / PostgreSQL / Glue / Alpine"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot deploy.ci.api.yml -v
docker/sdk up -t -v
docker/sdk testing codecept fixtures
docker/sdk testing console queue:worker:start --stop-when-empty
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.api.yml
php-82-mariadb-acceptance-alpine:
name: "PHP 8.2 / MariaDB / Acceptance / Alpine"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.mariadb.yml
docker/sdk up -t
docker/sdk testing console queue:worker:start --stop-when-empty
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.acceptance.yml
php-82-postgresql-acceptance-alpine:
name: "PHP 8.2 / PostgreSQL / Acceptance / Alpine"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.yml
docker/sdk up -t
docker/sdk testing console queue:worker:start --stop-when-empty
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.acceptance.yml
php-82-mariadb-functional-alpine:
name: "PHP 8.2 / MariaDB / Functional / Alpine"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot deploy.ci.functional.mariadb.yml -v
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.functional.yml
php-82-postgresql-functional-alpine:
name: "PHP 8.2 / PostgreSQL / Functional / Alpine"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.functional.yml
docker/sdk up -t
docker/sdk testing console queue:worker:start --stop-when-empty
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.functional.yml
php-81-mariadb-glue-alpine:
name: "PHP 8.1 / MariaDB / Glue / Alpine"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot deploy.ci.api.mariadb.yml -v
docker/sdk up -t -v
docker/sdk testing codecept fixtures
docker/sdk testing console queue:worker:start --stop-when-empty
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.api.yml
php-81-postgresql-acceptance-alpine:
name: "PHP 8.1 / PostgreSQL / Acceptance / Alpine"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.yml
docker/sdk up -t
docker/sdk testing console queue:worker:start --stop-when-empty
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.acceptance.yml
php-81-postgresql-functional-alpine:
name: "PHP 8.1 / PostgreSQL / Functional / Alpine"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.yml
docker/sdk up -t
docker/sdk testing console queue:worker:start --stop-when-empty
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.functional.yml
php-81-mariadb-acceptance-alpine:
name: "PHP 8.1 / MariaDB / Acceptance / Alpine"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.mariadb.yml
docker/sdk up -t
docker/sdk testing console queue:worker:start --stop-when-empty
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.acceptance.yml
php-81-mariadb-functional-alpine:
name: "PHP 8.1 / MariaDB / Functional / Alpine"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot deploy.ci.functional.mariadb.yml -v
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.functional.yml
php-81-postgres-functional-debian:
name: "PHP 8.1 / PostgreSQL / Functional / Debian"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1-debian
TRAVIS: 1
steps:
- uses: actions/checkout@v4
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Run docker
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot deploy.ci.functional.yml -v
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing codecept run -c codeception.functional.yml
frontend-assets-via-docker-php-8-1:
name: "Docker / Alpine / PHP 8.1 / Frontend & Assets"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
steps:
- uses: actions/checkout@v4
- run: echo eyAiZXhwZXJpbWVudGFsIiA6IHRydWUsICJmZWF0dXJlcyIgOiB7ICJidWlsZGtpdCI6IHRydWUgfSB9Cg==|base64 -d|sudo tee /etc/docker/daemon.json
- run: sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- run: sudo chmod +x /usr/local/bin/docker-compose
- run: git clone https://github.com/spryker/docker-sdk.git --single-branch --branch master ./docker
- run: docker/sdk boot deploy.yml
- run: SPRYKER_BUILD_HASH=myhash docker/sdk export images
- run: docker run -t --rm -e SPRYKER_NGINX_CGI_HOST_YVES_EU=localhost -e SPRYKER_NGINX_CGI_HOST_ZED_EU=localhost -e SPRYKER_NGINX_CGI_HOST_GLUE_EU=localhost -e SPRYKER_NGINX_CGI_HOST_YVES_US=localhost -e SPRYKER_NGINX_CGI_HOST_GLUE_US=localhost -e SPRYKER_NGINX_CGI_HOST_ZED_US=localhost -e ALLOWED_IP=127.0.0.1 spryker_b2c_frontend:1.0-frontend nginx -t
- run: docker run -t --rm --entrypoint='' spryker_b2c_frontend:1.0-frontend ls -al /data/public/Yves/assets/myhash
- run: docker run -t --rm --entrypoint='' spryker_b2c_frontend:1.0-frontend ls -al /data/public/Zed/assets/
docker-alpine-php-8-1-mariadb-robot:
name: "Docker / Alpine / PHP 8.1 / MariaDB / Robot/ API"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
TRAVIS: 1
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt install awscli -q
- name: Install robotframework-suite-tests folder
run: |
cd ./data && composer require "spryker/robotframework-suite-tests:dev-master" --dev --no-interaction
cp -r vendor ../vendor
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Install Project
continue-on-error: true
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.mariadb.yml
sudo bash -c "echo '127.0.0.1 backend-api.at.spryker.local backend-api.de.spryker.local glue-backend.de.spryker.local glue-backend.at.spryker.local glue-storefront.de.spryker.local glue-storefront.at.spryker.local backend-gateway.at.spryker.local backend-gateway.de.spryker.local backoffice.at.spryker.local backoffice.de.spryker.local date-time-configurator-example.spryker.local glue.at.spryker.local glue.de.spryker.local yves.at.spryker.local yves.de.spryker.local' >> /etc/hosts"
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing console queue:worker:start --stop-when-empty
APPLICATION_STORE=AT docker/sdk console queue:worker:start --stop-when-empty
- name: Run Tests
run: |
docker/sdk exec robot-framework robot -v env:api_b2c -v docker:True --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s robotframework.tests.api.b2c .
- name: Upload artifacts
if: failure()
run: |
AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp .robot/results s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/b2c-robot-api-ci/${GITHUB_RUN_ID}/PHP8.1MariaDBRobot/ \
--recursive \
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"
docker-alpine-php-8-2-postgresql-robot:
name: "Docker / Alpine / PHP 8.2 / PostgreSQL / Robot/ API"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install packages
run: |
sudo apt install awscli -q
- name: Install robotframework-suite-tests folder
run: |
cd ./data && composer require "spryker/robotframework-suite-tests:dev-master" --dev --no-interaction
cp -r vendor ../vendor
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Install Project
continue-on-error: true
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.yml
sudo bash -c "echo '127.0.0.1 backend-api.at.spryker.local backend-api.de.spryker.local glue-backend.de.spryker.local glue-backend.at.spryker.local glue-storefront.de.spryker.local glue-storefront.at.spryker.local backend-gateway.at.spryker.local backend-gateway.de.spryker.local backoffice.at.spryker.local backoffice.de.spryker.local date-time-configurator-example.spryker.local glue.at.spryker.local glue.de.spryker.local yves.at.spryker.local yves.de.spryker.local' >> /etc/hosts"
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing console queue:worker:start --stop-when-empty
APPLICATION_STORE=AT docker/sdk console queue:worker:start --stop-when-empty
- name: Run Tests
run: |
docker/sdk exec robot-framework robot -v env:api_b2c -v db_engine:psycopg2 -v docker:True --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s robotframework.tests.api.b2c .
- name: Upload artifacts
if: failure()
run: |
AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp .robot/results s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/b2c-robot-api-ci/${GITHUB_RUN_ID}/PHP8.2PostgreSQLRobot/ \
--recursive \
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"
docker-alpine-php-8-2-mariadb-robot-dynamic-multistore:
name: "Docker / Alpine / PHP 8.2 / MariaDB / Robot / API / Dynamic Multistore"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt install awscli -q
- name: Install robotframework-suite-tests folder
run: |
cd ./data && composer require "spryker/robotframework-suite-tests:dev-master" --dev --no-interaction
cp -r vendor ../vendor
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Install Project
continue-on-error: true
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.api.mariadb.dynamic-store.robot.yml
sudo bash -c "echo '127.0.0.1 backend-api.eu.spryker.local backend-api.us.spryker.local backend-gateway.eu.spryker.local backend-gateway.us.spryker.local backoffice.eu.spryker.local backoffice.us.spryker.local glue-backend.eu.spryker.local glue-backend.us.spryker.local glue-storefront.eu.spryker.local glue-storefront.us.spryker.local glue.eu.spryker.local glue.us.spryker.local mail.spryker.local mp.eu.spryker.local mp.us.spryker.local queue.spryker.local scheduler.spryker.local spryker.local swagger.spryker.local yves.eu.spryker.local yves.us.spryker.local' >> /etc/hosts"
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
SPRYKER_CURRENT_REGION=EU docker/sdk console queue:worker:start --stop-when-empty
- name: Run Tests
run: |
docker/sdk exec robot-framework robot -v env:api_b2c -v docker:True -v dms:true -v glue_env:http://glue.eu.spryker.local -v bapi_env:http://glue-backend.eu.spryker.local -v sapi_env:http://glue-storefront.eu.spryker.local --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s robotframework.tests.api.b2c .
- name: Upload artifacts
if: failure()
run: |
AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp .robot/results s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/b2c-robot-api-ci-dynamic-multistore/${GITHUB_RUN_ID}/PHP8.1MariaDBRobot/ \
--recursive \
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"
docker-alpine-php-8-2-mariadb-cypress:
name: "Docker / Alpine / PHP 8.2 / MariaDB / Cypress / UI"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt install awscli -q
- name: Install cypress-tests folder
run: |
cd ./data && composer require "spryker/cypress-tests:dev-master" --dev --no-interaction
cp -r vendor ../vendor
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Install Project
continue-on-error: true
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.mariadb.cypress.yml
sudo bash -c "echo '127.0.0.1 backend-api.eu.spryker.local backend-api.us.spryker.local backend-gateway.eu.spryker.local backend-gateway.us.spryker.local backoffice.eu.spryker.local backoffice.us.spryker.local glue-backend.eu.spryker.local glue-backend.us.spryker.local glue-storefront.eu.spryker.local glue-storefront.us.spryker.local glue.eu.spryker.local glue.us.spryker.local mail.spryker.local mp.eu.spryker.local mp.us.spryker.local queue.spryker.local scheduler.spryker.local spryker.local swagger.spryker.local yves.eu.spryker.local yves.us.spryker.local' >> /etc/hosts"
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk cli console queue:worker:start --stop-when-empty
- name: Run Tests
run: |
docker/sdk exec cypress-tests cp .env.example .env
for i in 1 2; do
docker/sdk exec --env "ENV_REPOSITORY_ID=b2c" cypress-tests npm run cy:ci && s=0 && break || s=$? && echo "Test failed, retrying..."
sleep 1
done
(exit $s)
- name: Upload artifacts
if: failure()
run: |
AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp .cypress s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/cypress-ui/b2c/${GITHUB_RUN_ID}/ \
--recursive \
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"
docker-alpine-php-8-2-mariadb-cypress-dynamic-multistore:
name: "Docker / Alpine / PHP 8.2 / MariaDB / Cypress / UI / Dynamic Store"
if: "!contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2
TRAVIS: 1
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt install awscli -q
- name: Install cypress-tests folder
run: |
cd ./data && composer require "spryker/cypress-tests:dev-master" --dev --no-interaction
cp -r vendor ../vendor
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Install Project
continue-on-error: true
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.mariadb.dynamic-store.cypress.yml
sudo bash -c "echo '127.0.0.1 backend-api.eu.spryker.local backend-api.us.spryker.local backend-gateway.eu.spryker.local backend-gateway.us.spryker.local backoffice.eu.spryker.local backoffice.us.spryker.local glue-backend.eu.spryker.local glue-backend.us.spryker.local glue-storefront.eu.spryker.local glue-storefront.us.spryker.local glue.eu.spryker.local glue.us.spryker.local mail.spryker.local mp.eu.spryker.local mp.us.spryker.local queue.spryker.local scheduler.spryker.local spryker.local swagger.spryker.local yves.eu.spryker.local yves.us.spryker.local' >> /etc/hosts"
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk cli console queue:worker:start --stop-when-empty
- name: Run Tests
run: |
docker/sdk exec cypress-tests cp .env.dynamic-store.example .env
for i in 1 2; do
docker/sdk exec --env "ENV_REPOSITORY_ID=b2c" cypress-tests npm run cy:ci && s=0 && break || s=$? && echo "Test failed, retrying..."
sleep 1
done
(exit $s)
- name: Upload artifacts
if: failure()
run: |
AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp .cypress s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/cypress-ui/b2c/${GITHUB_RUN_ID}/ \
--recursive \
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"
positive-docker-alpine-php-8-1-mariadb-robot:
name: "[Hackathon] Positive / Docker / Alpine / PHP 8.1 / MariaDB / Robot/ API"
if: "contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
TRAVIS: 1
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt install awscli -q
- name: Install robotframework-suite-tests folder
run: |
cd ./data && composer require "spryker/robotframework-suite-tests:dev-master" --dev --no-interaction
cp -r vendor ../vendor
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Install Project
continue-on-error: true
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.mariadb.yml
sudo bash -c "echo '127.0.0.1 backend-api.at.spryker.local backend-api.de.spryker.local glue-backend.de.spryker.local glue-backend.at.spryker.local glue-storefront.de.spryker.local glue-storefront.at.spryker.local backend-gateway.at.spryker.local backend-gateway.de.spryker.local backoffice.at.spryker.local backoffice.de.spryker.local date-time-configurator-example.spryker.local glue.at.spryker.local glue.de.spryker.local yves.at.spryker.local yves.de.spryker.local' >> /etc/hosts"
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing console queue:worker:start --stop-when-empty
APPLICATION_STORE=AT docker/sdk console queue:worker:start --stop-when-empty
- name: Run Tests
run: |
docker/sdk exec robot-framework robot -v env:api_b2c -v docker:True --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s robotframework.tests.api.b2c.'*'.positive .
- name: Upload artifacts
if: failure()
run: |
AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp .robot/results s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/b2c-robot-api-ci/${GITHUB_RUN_ID}/PHP8.1MariaDBRobot/ \
--recursive \
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"
negative-docker-alpine-php-8-1-mariadb-robot:
name: "[Hackathon] Negative / Docker / Alpine / PHP 8.1 / MariaDB / Robot/ API"
if: "contains(github.event.pull_request.head.ref, 'hackathon')"
runs-on: ubuntu-22.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
TRAVIS: 1
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt install awscli -q
- name: Install robotframework-suite-tests folder
run: |
cd ./data && composer require "spryker/robotframework-suite-tests:dev-master" --dev --no-interaction
cp -r vendor ../vendor
- name: Install docker-compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Install Project
continue-on-error: true
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.mariadb.yml
sudo bash -c "echo '127.0.0.1 backend-api.at.spryker.local backend-api.de.spryker.local glue-backend.de.spryker.local glue-backend.at.spryker.local glue-storefront.de.spryker.local glue-storefront.at.spryker.local backend-gateway.at.spryker.local backend-gateway.de.spryker.local backoffice.at.spryker.local backoffice.de.spryker.local date-time-configurator-example.spryker.local glue.at.spryker.local glue.de.spryker.local yves.at.spryker.local yves.de.spryker.local' >> /etc/hosts"
docker/sdk up -t -v
docker/sdk cli composer dump-autoload -o -a --apcu
docker/sdk testing console queue:worker:start --stop-when-empty
APPLICATION_STORE=AT docker/sdk console queue:worker:start --stop-when-empty
- name: Run Tests
run: |
docker/sdk exec robot-framework robot -v env:api_b2c -v docker:True --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s robotframework.tests.api.b2c.'*'.negative .
- name: Upload artifacts
if: failure()
run: |
AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp .robot/results s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/b2c-robot-api-ci/${GITHUB_RUN_ID}/PHP8.1MariaDBRobot/ \
--recursive \
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"