Build #353
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches-ignore: | |
| - 'dependabot/**' | |
| paths-ignore: | |
| - "adr/**" | |
| - "*.md" | |
| pull_request: | |
| paths-ignore: | |
| - "adr/**" | |
| - "*.md" | |
| release: | |
| types: [created] | |
| schedule: | |
| - | |
| cron: "0 1 * * *" # Run at 1am every day | |
| 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 }}, MySQL ${{ matrix.database_version }}" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ["8.3"] | |
| symfony: ["^6.4", "~7.3.0"] | |
| sylius: ["~2.0.7", "~2.1.0"] | |
| node: ["22.x"] | |
| database: ["mysql"] | |
| database_version: ["8.4"] | |
| env: | |
| APP_ENV: test | |
| DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?serverVersion=${{ matrix.database_version }}" | |
| steps: | |
| - | |
| uses: actions/checkout@v4 | |
| - | |
| name: Build Sylius Test Application | |
| uses: SyliusLabs/BuildTestAppAction@v3.2.0 | |
| 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 }}" | |
| database_version: "${{ matrix.database_version }}" | |
| node_version: "${{ matrix.node }}" | |
| php_version: "${{ matrix.php }}" | |
| sylius_version: "${{ matrix.sylius }}" | |
| symfony_version: "${{ matrix.symfony }}" | |
| - | |
| name: Run security check | |
| run: composer audit --abandoned=ignore | |
| - | |
| name: Validate composer.json | |
| run: composer validate --ansi --strict | |
| - | |
| name: Run ECS | |
| run: vendor/bin/ecs | |
| - | |
| name: Lint container | |
| run: vendor/bin/console lint:container | |
| - | |
| name: Run PHPStan | |
| run: vendor/bin/phpstan analyse -c phpstan.neon src/ | |
| - | |
| name: Run PHPUnit | |
| run: vendor/bin/phpunit --colors=always | |
| - | |
| name: Run Behat | |
| run: vendor/bin/behat --colors --strict -vvv -f progress --no-interaction || vendor/bin/behat --colors --strict -vvv -f progress --no-interaction --rerun | |
| - | |
| name: Upload Behat logs | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: "Behat logs - Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}" | |
| path: etc/build/ | |
| if-no-files-found: ignore | |
| compression-level: 6 | |
| overwrite: true | |
| - | |
| name: Upload test log logs | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: "Var logs - Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}" | |
| path: tests/Application/var/log/ | |
| if-no-files-found: ignore | |
| compression-level: 6 | |
| overwrite: true |