5555 DATABASE_URL : " mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=${{ matrix.mysql }}"
5656
5757 steps :
58- - name : Set variables
59- shell : bash
60- env :
61- BRANCH : ${{ inputs.branch }}
62- run : |
63- if [ "$BRANCH" == "1.12" ]; then
64- echo "USE_LEGACY_POSTGRES_SETUP=yes" >> $GITHUB_ENV
65- else
66- echo "USE_LEGACY_POSTGRES_SETUP=no" >> $GITHUB_ENV
67- fi
68-
6958 - name : " Checkout (With Branch)"
7059 if : " ${{ inputs.branch != '' }}"
7160 uses : actions/checkout@v4
7665 if : " ${{ inputs.branch == '' }}"
7766 uses : actions/checkout@v4
7867
79- - name : Restrict Twig
80- if : matrix.twig == '^2.12'
81- run : composer require --no-update --no-scripts --no-interaction "twig/twig:${{ matrix.twig }}"
82-
8368 - name : Prepare manifest.json files
8469 run : |
8570 mkdir -p public/build/admin
@@ -99,11 +84,10 @@ jobs:
9984 cache_restore_key : " ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}"
10085 e2e : " yes"
10186 database_version : ${{ matrix.mysql }}
102- legacy_postgresql_setup : ${{ env.USE_LEGACY_POSTGRES_SETUP }}
87+ legacy_postgresql_setup : " no "
10388 php_version : ${{ matrix.php }}
10489 symfony_version : ${{ matrix.symfony }}
10590 node_version : " 20.x"
106- chrome_version : stable
10791
10892 - name : Test installer
10993 run : bin/console sylius:install --no-interaction -vvv
@@ -131,10 +115,10 @@ jobs:
131115 if-no-files-found : ignore
132116 overwrite : true
133117
134- behat-ui-js-chromedriver :
118+ shop- behat-ui-js-chromedriver :
135119 needs : get-matrix
136120 runs-on : ubuntu-latest
137- name : " JS with Chromedriver, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }} (${{ matrix.env || 'test_cached' }}), MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }}"
121+ name : " Shop JS with Chromedriver, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }} (${{ matrix.env || 'test_cached' }}), MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }}"
138122 timeout-minutes : 45
139123 strategy :
140124 fail-fast : false
@@ -149,12 +133,6 @@ jobs:
149133 shell : bash
150134 env :
151135 BRANCH : ${{ inputs.branch }}
152- run : |
153- if [ "$BRANCH" == "1.12" ]; then
154- echo "USE_LEGACY_POSTGRES_SETUP=yes" >> $GITHUB_ENV
155- else
156- echo "USE_LEGACY_POSTGRES_SETUP=no" >> $GITHUB_ENV
157- fi
158136
159137 - name : " Checkout (With Branch)"
160138 if : " ${{ inputs.branch != '' }}"
@@ -177,10 +155,6 @@ jobs:
177155 key : " ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}"
178156 restore-keys : " ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}"
179157
180- - name : Restrict Twig
181- if : matrix.twig == '^2.12'
182- run : composer require --no-update --no-scripts --no-interaction "twig/twig:${{ matrix.twig }}"
183-
184158 - name : Build application
185159 uses : SyliusLabs/BuildTestAppAction@v2.3
186160 with :
@@ -190,13 +164,13 @@ jobs:
190164 e2e : " yes"
191165 e2e_js : " yes"
192166 database_version : ${{ matrix.mysql }}
193- legacy_postgresql_setup : ${{ env.USE_LEGACY_POSTGRES_SETUP }}
167+ legacy_postgresql_setup : " no "
194168 php_version : ${{ matrix.php }}
195169 symfony_version : ${{ matrix.symfony }}
196170 node_version : " 20.x"
197171
198172 - name : Run Behat (Chromedriver)
199- run : vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" --rerun
173+ run : vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" features/shop || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" features/shop --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" --rerun features/shop
200174
201175 - name : Run Behat (Chromedriver) for randomly failing scenarios (@failing)
202176 run : vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&@failing" --suite-tags="@hybrid,@ui" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&@failing" --suite-tags="@hybrid,@ui" --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&@failing" --suite-tags="@hybrid,@ui" --rerun
@@ -213,10 +187,10 @@ jobs:
213187 if-no-files-found : ignore
214188 overwrite : true
215189
216- behat-ui-js-panther :
190+ admin- behat-ui-js-chromedriver :
217191 needs : get-matrix
218192 runs-on : ubuntu-latest
219- name : " JS with Panther , PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }} (${{ matrix.env || 'test_cached' }}), MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }}"
193+ name : " Admin JS with Chromedriver , PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }} (${{ matrix.env || 'test_cached' }}), MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }}"
220194 timeout-minutes : 45
221195 strategy :
222196 fail-fast : false
@@ -227,17 +201,6 @@ jobs:
227201 DATABASE_URL : " mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=${{ matrix.mysql }}"
228202
229203 steps :
230- - name : Set variables
231- shell : bash
232- env :
233- BRANCH : ${{ inputs.branch }}
234- run : |
235- if [ "$BRANCH" == "1.12" ]; then
236- echo "USE_LEGACY_POSTGRES_SETUP=yes" >> $GITHUB_ENV
237- else
238- echo "USE_LEGACY_POSTGRES_SETUP=no" >> $GITHUB_ENV
239- fi
240-
241204 - name : " Checkout (With Branch)"
242205 if : " ${{ inputs.branch != '' }}"
243206 uses : actions/checkout@v4
@@ -272,13 +235,80 @@ jobs:
272235 e2e : " yes"
273236 e2e_js : " yes"
274237 database_version : ${{ matrix.mysql }}
275- legacy_postgresql_setup : ${{ env.USE_LEGACY_POSTGRES_SETUP }}
238+ legacy_postgresql_setup : " no "
276239 php_version : ${{ matrix.php }}
277240 symfony_version : ${{ matrix.symfony }}
278241 node_version : " 20.x"
279242
280- - name : Install Behat driver
281- run : vendor/bin/bdi detect drivers
243+ - name : Run Behat (Chromedriver)
244+ run : vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" features/admin || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" features/admin --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" --rerun features/admin
245+
246+ - name : Run Behat (Chromedriver)
247+ run : vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" features/hybrid || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" features/hybrid --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&~@failing" --suite-tags="@hybrid,@ui" --rerun features/hybrid
248+
249+ - name : Run Behat (Chromedriver) for randomly failing scenarios (@failing)
250+ run : vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&@failing" --suite-tags="@hybrid,@ui" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&@failing" --suite-tags="@hybrid,@ui" --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@mink:chromedriver&&~@todo&&~@cli&&@failing" --suite-tags="@hybrid,@ui" --rerun
251+ continue-on-error : true
252+
253+ - name : Upload logs
254+ uses : actions/upload-artifact@v4
255+ if : failure()
256+ with :
257+ name : " Logs (JS with Chromedriver, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, Twig ${{ matrix.twig }}, MySQL ${{ matrix.mysql }}) - ${{ github.run_id }}-${{ github.run_number }}"
258+ path : |
259+ etc/build/
260+ var/log
261+ if-no-files-found : ignore
262+ overwrite : true
263+
264+ behat-ui-js-panther :
265+ needs : get-matrix
266+ runs-on : ubuntu-latest
267+ name : " JS with Panther, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }} (${{ matrix.env || 'test_cached' }}), MySQL ${{ matrix.mysql }}, Twig ${{ matrix.twig }}"
268+ timeout-minutes : 45
269+ strategy :
270+ fail-fast : false
271+ matrix : ${{ fromJson(needs.get-matrix.outputs.matrix) }}
272+
273+ env :
274+ APP_ENV : ${{ matrix.env || 'test_cached' }}
275+ DATABASE_URL : " mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=${{ matrix.mysql }}"
276+
277+ steps :
278+ - name : " Checkout (With Branch)"
279+ if : " ${{ inputs.branch != '' }}"
280+ uses : actions/checkout@v4
281+ with :
282+ ref : ${{ inputs.branch }}
283+
284+ - name : " Checkout"
285+ if : " ${{ inputs.branch == '' }}"
286+ uses : actions/checkout@v4
287+
288+ - name : Get Composer cache directory
289+ id : composer-cache
290+ run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
291+
292+ - name : " Restore dependencies"
293+ uses : actions/cache@v4
294+ with :
295+ path : ${{ steps.composer-cache.outputs.dir }}
296+ key : " ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}"
297+ restore-keys : " ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}"
298+
299+ - name : Build application
300+ uses : SyliusLabs/BuildTestAppAction@v2.3
301+ with :
302+ build_type : " sylius"
303+ cache_key : " ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}"
304+ cache_restore_key : " ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}"
305+ e2e : " yes"
306+ e2e_js : " yes"
307+ database_version : ${{ matrix.mysql }}
308+ legacy_postgresql_setup : " no"
309+ php_version : ${{ matrix.php }}
310+ symfony_version : ${{ matrix.symfony }}
311+ node_version : " 20.x"
282312
283313 - name : Run Behat (Panther)
284314 run : vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --suite-tags="@hybrid,@ui" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --suite-tags="@hybrid,@ui" --rerun || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --suite-tags="@hybrid,@ui" --rerun
0 commit comments