Use BuildTestAppAction and fix DI tests #52
Workflow file for this run
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/**' | |
| pull_request: ~ | |
| release: | |
| types: [created] | |
| schedule: | |
| - | |
| cron: "0 1 * * 6" # Run at 1am every Saturday | |
| workflow_dispatch: ~ | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| name: "Sylius ${{ matrix.sylius }}, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ["8.3"] | |
| symfony: ["^7.3"] | |
| sylius: ["^2.1"] | |
| node: ["22.x"] | |
| mysql: ["8.4"] | |
| env: | |
| APP_ENV: test | |
| steps: | |
| - | |
| uses: actions/checkout@v4 | |
| - | |
| name: Build Sylius Test Application | |
| uses: SyliusLabs/BuildTestAppAction@v4.0.0 | |
| with: | |
| build_type: "plugin" | |
| cache_key: "${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}" | |
| cache_restore_key: "${{ runner.os }}-php-${{ matrix.php }}-composer-" | |
| database: "mysql:${{ matrix.mysql }}" | |
| node_version: "${{ matrix.node }}" | |
| php_version: "${{ matrix.php }}" | |
| sylius_version: "${{ matrix.sylius }}" | |
| symfony_version: "${{ matrix.symfony }}" | |
| - | |
| name: Validate composer.json | |
| run: composer validate --ansi --strict | |
| - | |
| name: Run PHPStan | |
| run: vendor/bin/phpstan analyse | |
| - | |
| name: Run ECS | |
| run: vendor/bin/ecs check | |
| - | |
| name: Run unit tests | |
| run: vendor/bin/phpunit --colors=always | |
| - | |
| name: Validate container | |
| run: vendor/bin/console lint:container | |
| - | |
| name: Validate database schema | |
| run: | | |
| vendor/bin/console doctrine:schema:update --force -vvv | |
| vendor/bin/console doctrine:schema:validate |