44 push :
55 branches-ignore :
66 - ' dependabot/**'
7- pull_request : ~
7+ paths-ignore :
8+ - " *.md"
9+ pull_request :
10+ paths-ignore :
11+ - " *.md"
812 release :
913 types : [created]
1014 schedule :
1115 -
1216 cron : " 0 1 * * 6" # Run at 1am every Saturday
1317 workflow_dispatch : ~
1418
19+ concurrency :
20+ group : ${{ github.workflow }}-${{ github.ref }}
21+ cancel-in-progress : true
22+
1523jobs :
1624 tests :
1725 runs-on : ubuntu-latest
1826
19- name : " Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}"
27+ name : " Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, ${{ matrix.database }}"
2028
2129 strategy :
2230 fail-fast : false
2331 matrix :
2432 php : ["8.3"]
25- symfony : ["^6.4", "^7.3"]
26- sylius : ["~2.0.0", "~2.1.0"]
33+ symfony : ["^6.4", "^7.4"]
34+ sylius : ["~2.0.0", "~2.1.0", "~2.2.0"]
35+ database : ["mysql:8.4"]
2736 node : ["22.x"]
28- mysql : ["8.4"]
37+
38+ exclude :
39+ - sylius : " ~2.0.0"
40+ symfony : " ^7.4"
41+
42+ include :
43+ - php : " 8.3"
44+ symfony : " ^7.4"
45+ sylius : " ~2.2.0"
46+ database : " mysql:8.0"
47+ node : " 22.x"
48+ - php : " 8.3"
49+ symfony : " ^7.4"
50+ sylius : " ~2.2.0"
51+ database : " mariadb:10.11"
52+ node : " 22.x"
53+ - php : " 8.3"
54+ symfony : " ^7.4"
55+ sylius : " ~2.2.0"
56+ database : " mariadb:11.4"
57+ node : " 22.x"
58+ - php : " 8.3"
59+ symfony : " ^7.4"
60+ sylius : " ~2.2.0"
61+ database : " postgres:15"
62+ node : " 22.x"
63+ - php : " 8.3"
64+ symfony : " ^7.4"
65+ sylius : " ~2.2.0"
66+ database : " postgres:16"
67+ node : " 22.x"
68+ - php : " 8.3"
69+ symfony : " ^7.4"
70+ sylius : " ~2.2.0"
71+ database : " postgres:17"
72+ node : " 22.x"
2973
3074 env :
3175 APP_ENV : test
32- BEHAT_BASE_URL : " http://127.0.0.1:8080/"
33- DATABASE_URL : " mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.mysql }}"
3476
3577 steps :
3678 -
3779 uses : actions/checkout@v4
3880
3981 -
40- name : Setup PHP
41- uses : shivammathur/setup-php@v2
42- with :
43- php-version : " ${{ matrix.php }}"
44- extensions : intl
45- tools : flex, symfony
46- coverage : none
47-
48- -
49- name : Setup Node
50- uses : actions/setup-node@v4
82+ name : Build Sylius Test Application
83+ uses : SyliusLabs/BuildTestAppAction@v4
5184 with :
52- node-version : " ${{ matrix.node }}"
53-
54- -
55- name : Shutdown default MySQL
56- run : sudo service mysql stop
57-
58- -
59- name : Setup MySQL
60- uses : mirromutth/mysql-action@v1.1
61- with :
62- mysql version : " ${{ matrix.mysql }}"
63- mysql root password : " root"
64-
65- -
66- name : Output PHP version for Symfony CLI
67- run : php -v | head -n 1 | awk '{ print $2 }' > .php-version
68-
69- -
70- name : Get Composer cache directory
71- id : composer-cache
72- run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
73-
74- -
75- name : Cache Composer
76- uses : actions/cache@v4
77- with :
78- path : ${{ steps.composer-cache.outputs.dir }}
79- key : ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json **/composer.lock') }}
80- restore-keys : |
81- ${{ runner.os }}-php-${{ matrix.php }}-composer-
82-
83- -
84- name : Restrict Symfony version
85- if : matrix.symfony != ''
86- 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
89- composer config extra.symfony.require "${{ matrix.symfony }}"
90-
91- -
92- name : Restrict Sylius version
93- if : matrix.sylius != ''
94- run : composer require "sylius/sylius:${{ matrix.sylius }}" --no-update --no-scripts --no-interaction
95-
96- -
97- name : Install PHP dependencies
98- run : composer install --no-interaction
85+ e2e_js : " yes"
86+ cache_key : " ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}"
87+ cache_restore_key : " ${{ runner.os }}-php-${{ matrix.php }}-composer-"
88+ database : " ${{ matrix.database }}"
89+ node_version : " ${{ matrix.node }}"
90+ php_version : " ${{ matrix.php }}"
91+ sylius_version : " ${{ matrix.sylius }}"
92+ symfony_version : " ${{ matrix.symfony }}"
9993
10094 -
10195 name : Run unit tests
10296 run : vendor/bin/phpunit --colors=always --testsuite=unit
10397
104- -
105- name : Get Yarn cache directory
106- id : yarn-cache
107- run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
108-
109- -
110- name : Cache Yarn
111- uses : actions/cache@v4
112- with :
113- path : ${{ steps.yarn-cache.outputs.dir }}
114- key : ${{ runner.os }}-node-${{ matrix.node }}-yarn-${{ hashFiles('**/package.json **/yarn.lock') }}
115- restore-keys : |
116- ${{ runner.os }}-node-${{ matrix.node }}-yarn-
117-
118- -
119- name : Install JS dependencies
120- run : (cd vendor/sylius/test-application && yarn install)
121-
122- -
123- name : Prepare test application database
124- run : |
125- (vendor/bin/console doctrine:database:create -vvv)
126- (vendor/bin/console doctrine:schema:create -vvv)
127-
128- -
129- name : Prepare test application assets
130- run : |
131- vendor/bin/console assets:install -vvv
132- (cd vendor/sylius/test-application && yarn build)
133-
134- -
135- name : Prepare test application cache
136- run : vendor/bin/console cache:warmup -vvv
137-
138- -
139- name : Load fixtures in test application
140- run : vendor/bin/console sylius:fixtures:load -n
141-
14298 -
14399 name : Validate composer.json
144100 run : composer validate --ansi --strict
@@ -151,14 +107,6 @@ jobs:
151107 name : Run Non-unit PHPUnit tests
152108 run : vendor/bin/phpunit --colors=always --testsuite=non-unit
153109
154- -
155- name : Run Chrome Headless
156- 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 &
157-
158- -
159- name : Run webserver
160- run : symfony server:start --port=8080 --no-tls --daemon
161-
162110 -
163111 name : Run Behat
164112 run : vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun
@@ -168,7 +116,7 @@ jobs:
168116 uses : actions/upload-artifact@v4
169117 if : failure()
170118 with :
171- name : " Behat logs - ${{ matrix.sylius }}- ${{ github.run_id }}- ${{ github.run_number }}"
119+ name : " Behat logs - Sylius ${{ matrix.sylius }} - ${{ matrix.database }} - ${{ github.run_id }}"
172120 path : etc/build/
173121 if-no-files-found : ignore
174122 compression-level : 6
0 commit comments