Skip to content

Use BuildTestAppAction and migrate from Panther to Chrome session #108

Use BuildTestAppAction and migrate from Panther to Chrome session

Use BuildTestAppAction and migrate from Panther to Chrome session #108

Workflow file for this run

name: Build
on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- "*.md"
pull_request:
paths-ignore:
- "*.md"
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, ${{ matrix.database }}"
strategy:
fail-fast: false
matrix:
php: ["8.3"]
symfony: ["^6.4", "^7.4"]
sylius: ["~2.0.0", "~2.1.0", "~2.2.0"]
database: ["mysql:8.4"]
node: ["22.x"]
exclude:
- sylius: "~2.0.0"
symfony: "^7.4"
include:
- php: "8.3"
symfony: "^7.4"
sylius: "~2.2.0"
database: "mysql:8.0"
node: "22.x"
- php: "8.3"
symfony: "^7.4"
sylius: "~2.2.0"
database: "mariadb:10.11"
node: "22.x"
- php: "8.3"
symfony: "^7.4"
sylius: "~2.2.0"
database: "mariadb:11.4"
node: "22.x"
- php: "8.3"
symfony: "^7.4"
sylius: "~2.2.0"
database: "postgres:15"
node: "22.x"
- php: "8.3"
symfony: "^7.4"
sylius: "~2.2.0"
database: "postgres:16"
node: "22.x"
- php: "8.3"
symfony: "^7.4"
sylius: "~2.2.0"
database: "postgres:17"
node: "22.x"
env:
APP_ENV: test
steps:
-
uses: actions/checkout@v4
-
name: Build Sylius Test Application
uses: SyliusLabs/BuildTestAppAction@feature/auto-database-url
with:
e2e_js: "yes"
cache_key: "${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}"
cache_restore_key: "${{ runner.os }}-php-${{ matrix.php }}-composer-"
database: "${{ matrix.database }}"
node_version: "${{ matrix.node }}"
php_version: "${{ matrix.php }}"
sylius_version: "${{ matrix.sylius }}"
symfony_version: "${{ matrix.symfony }}"
-
name: Run unit tests
run: vendor/bin/phpunit --colors=always --testsuite=unit
-
name: Validate composer.json
run: composer validate --ansi --strict
-
name: Validate container
run: vendor/bin/console lint:container
-
name: Run Non-unit PHPUnit tests
run: vendor/bin/phpunit --colors=always --testsuite=non-unit
-
name: Run Behat
run: vendor/bin/behat --colors --strict -vvv --no-interaction -f progress || vendor/bin/behat --colors --strict -vvv --no-interaction -f progress --rerun
-
name: Upload Behat logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: "Behat logs - Sylius ${{ matrix.sylius }} - ${{ matrix.database }} - ${{ github.run_id }}"
path: etc/build/
if-no-files-found: ignore
compression-level: 6
overwrite: true