|
| 1 | +name: Tests |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + merge_group: |
| 6 | +jobs: |
| 7 | + style: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + defaults: |
| 10 | + run: |
| 11 | + shell: nix-shell --pure --run "bash -euxo pipefail {0}" |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + - uses: cachix/install-nix-action@v22 |
| 15 | + - run: composer install --ignore-platform-req=ext-redis |
| 16 | + - run: vendor/bin/ecs |
| 17 | + - run: bin/console cache:warmup |
| 18 | + - run: bin/console lint:twig templates -n --format=github |
| 19 | + - run: composer validate composer.json --no-check-publish |
| 20 | + - run: symfony security:check |
| 21 | +# symfony security:check |
| 22 | +# vendor/bin/parallel-lint src public migrations config |
| 23 | +# composer validate composer.json --no-check-publish |
| 24 | +# XDEBUG_MODE=off bin/composer-require-checker --no-interaction --config-file=$PWD/composer-require-checker.json |
| 25 | +# vendor/bin/config-transformer --dry-run |
| 26 | +# bin/console lint:container -n |
| 27 | +# bin/console cache:warmup |
| 28 | +# bin/console lint:twig templates -n {{ if output == "github" { "--format=github" } else { "" } }} |
| 29 | +# bin/console lint:yaml . *.yaml --parse-tags -n {{ if output == "github" { "--format=github" } else { "" } }} |
| 30 | +# bin/console debug:translation --all --only-missing en |
| 31 | +# bin/console lint:xliff translations --no-interaction {{ if output == "github" { "--format=github" } else { "" } }} |
| 32 | +# vendor/bin/rector --dry-run |
| 33 | +# vendor/bin/php-cs-fixer fix --dry-run --diff |
| 34 | +# vendor/bin/psalm {{ if output == "github" { "--output-format=github" } else { "" } }} |
| 35 | +# vendor/bin/phpstan -v --memory-limit=1G {{ if output == "github" { "--error-format=github" } else { "" } }} |
| 36 | +# cd .. && pnpm spectral lint openapi.yaml {{ if output == "github" { "--format=github-actions" } else { "" } }} |
| 37 | + |
| 38 | + psalm: |
| 39 | + runs-on: ubuntu-latest |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v4 |
| 42 | + - uses: cachix/install-nix-action@v22 |
| 43 | + - shell: nix-shell --pure --run "bash -euxo pipefail {0}" |
| 44 | + run: | |
| 45 | + # TODO: cache composer dependencies |
| 46 | + # TODO: check why --ignore-platform-req=ext-redis is needed |
| 47 | + composer install --ignore-platform-req=ext-redis |
| 48 | + vendor/bin/psalm --output-format=github |
| 49 | + |
| 50 | + phpunit: |
| 51 | + runs-on: ubuntu-latest |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v4 |
| 54 | + - uses: cachix/install-nix-action@v22 |
| 55 | + # TODO: cache the build |
| 56 | + - shell: nix-shell --pure --run "bash -euxo pipefail {0}" |
| 57 | + run: | |
| 58 | + # TODO: cache composer dependencies |
| 59 | + # TODO: check why --ignore-platform-req=ext-redis is needed |
| 60 | + composer install --ignore-platform-req=ext-redis |
| 61 | + XDEBUG_MODE=coverage vendor/bin/phpunit --order-by=random --stop-on-error --stop-on-failure |
0 commit comments