66 - ' dependabot/**'
77 pull_request : ~
88 release :
9- types : [created]
9+ types : [ created ]
1010 schedule :
1111 -
1212 cron : " 0 1 * * 6" # Run at 1am every Saturday
@@ -21,13 +21,15 @@ jobs:
2121 strategy :
2222 fail-fast : false
2323 matrix :
24- php : [ "8.2", "8.3" ]
25- symfony : [ "^6.4", "^7.1" ]
26- node : ["20.x"]
27- mysql : ["8.0"]
24+ php : [ "8.3", "8.4" ]
25+ symfony : [ "^6.4", "^7.4" ]
26+ sylius : [ "~2.1.10", "~2.2.1" ]
27+ node : [ "22.x" ]
28+ mysql : [ "8.4" ]
2829
2930 env :
3031 APP_ENV : test
32+ BEHAT_BASE_URL : " https://127.0.0.1:8080/"
3133 DATABASE_URL : " mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
3234
3335 steps :
4042 with :
4143 php-version : " ${{ matrix.php }}"
4244 extensions : intl
43- tools : flex,symfony
45+ tools : flex, symfony
4446 coverage : none
4547
4648 -
6466 name : Output PHP version for Symfony CLI
6567 run : php -v | head -n 1 | awk '{ print $2 }' > .php-version
6668
67- -
68- name : Install certificates
69- run : symfony server:ca:install
70-
71- -
72- name : Run Chrome Headless
73- run : google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
74-
75- -
76- name : Run webserver
77- run : (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
78-
79- -
80- name : Validate composer.json
81- run : composer validate --ansi --strict
82-
8369 -
8470 name : Get Composer cache directory
8571 id : composer-cache
@@ -94,16 +80,12 @@ jobs:
9480 restore-keys : |
9581 ${{ runner.os }}-php-${{ matrix.php }}-composer-
9682
97- -
98- name : Configure global composer
99- run : |
100- composer global config --no-plugins allow-plugins.symfony/flex true
101- composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.2.2"
102-
10383 -
10484 name : Restrict Symfony version
10585 if : matrix.symfony != ''
10686 run : |
87+ composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^2.4"
88+ composer global config --no-plugins allow-plugins.symfony/flex true
10789 composer config extra.symfony.require "${{ matrix.symfony }}"
10890
10991 -
@@ -113,9 +95,23 @@ jobs:
11395
11496 -
11597 name : Install PHP dependencies
116- run : composer install --no-interaction --no-plugins
117- env :
118- SYMFONY_REQUIRE : ${{ matrix.symfony }}
98+ run : composer install --no-interaction
99+
100+ -
101+ name : RUN EasyCodingStandard
102+ run : vendor/bin/ecs check
103+
104+ -
105+ name : Run PHPStan
106+ run : vendor/bin/phpstan analyse -c phpstan.neon -l max src/
107+
108+ -
109+ name : Run Psalm
110+ run : vendor/bin/psalm
111+
112+ -
113+ name : Run unit tests
114+ run : vendor/bin/phpunit --colors=always --testsuite=unit
119115
120116 -
121117 name : Get Yarn cache directory
@@ -133,65 +129,66 @@ jobs:
133129
134130 -
135131 name : Install JS dependencies
136- run : (cd tests/Application && yarn install)
132+ run : (cd vendor/sylius/test-application && yarn install)
137133
138134 -
139135 name : Prepare test application database
140136 run : |
141- (cd tests/Application && bin/console doctrine:database:create -vvv)
142- (cd tests/Application && bin/console doctrine:schema:create -vvv)
137+ (vendor/ bin/console doctrine:database:create -vvv)
138+ (vendor/ bin/console doctrine:schema:create -vvv)
143139
144140 -
145141 name : Prepare test application assets
146142 run : |
147- (cd tests/Application && bin/console assets:install public -vvv)
148- (cd tests/Application && bin/console sylius:install:assets -vvv)
149- (cd tests/Application && yarn build:prod)
143+ vendor/bin/console assets:install -vvv
144+ (cd vendor/sylius/test-application && yarn build)
150145
151146 -
152147 name : Prepare test application cache
153- run : (cd tests/Application && bin/console cache:warmup -vvv)
148+ run : vendor/ bin/console cache:warmup -vvv
154149
155150 -
156151 name : Load fixtures in test application
157- run : (cd tests/Application && bin/console sylius:fixtures:load -n)
152+ run : vendor/ bin/console sylius:fixtures:load -n
158153
159154 -
160- name : Validate database schema
161- run : (cd tests/Application && bin/console doctrine:schema:validate)
155+ name : Validate composer.json
156+ run : composer validate --ansi --strict
162157
163158 -
164- name : Run ECS
165- run : vendor/bin/ecs check
159+ name : Validate container
160+ run : vendor/bin/console lint:container
166161
167162 -
168- name : Run PHPStan
169- run : vendor/bin/phpstan analyse
163+ name : Run Non-unit PHPUnit tests
164+ run : vendor/bin/phpunit --colors=always --testsuite=non-unit
170165
171166 -
172- name : Run Psalm
173- run : vendor/bin/psalm
167+ name : Run Chrome Headless
168+ run : google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &
174169
175170 -
176- name : Run PHPSpec
177- run : vendor/bin/phpspec run --ansi -f progress --no-interaction
171+ name : Install certificates
172+ run : symfony server:ca:install || true
178173
179174 -
180- name : Run PHPUnit
181- run : vendor/bin/phpunit --colors=always
175+ name : Run webserver
176+ run : symfony server:start --port=8080 --daemon
182177
183178 -
184179 name : Run Behat
185- run : vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
180+ run : vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun
186181
187182 -
188183 name : Upload Behat logs
189184 uses : actions/upload-artifact@v4
190185 if : failure()
191186 with :
192- name : Behat logs
187+ name : " Behat logs - ${{ matrix.sylius }}-${{ github.run_id }}-${{ github.run_number }} "
193188 path : etc/build/
194189 if-no-files-found : ignore
190+ compression-level : 6
191+ overwrite : true
195192
196193 roave_bc_check :
197194 name : Roave BC Check
0 commit comments