Skip to content

Commit

Permalink
Merge pull request #28 from HellPat/matrix-checks
Browse files Browse the repository at this point in the history
multi step
  • Loading branch information
HellPat committed Jan 24, 2024
2 parents 23fd920 + d60c43b commit e932822
Showing 1 changed file with 28 additions and 36 deletions.
64 changes: 28 additions & 36 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,40 @@ on:
push:
merge_group:
jobs:
style:
# TODO: build container once, before running static-analysis
static-analysis:
runs-on: ubuntu-latest
defaults:
run:
shell: nix-shell --pure --run "bash -euxo pipefail {0}"
defaults:
run:
shell: nix-shell --pure --run "bash -euxo pipefail {0}"
strategy:
fail-fast: false
matrix:
check:
- vendor/bin/psalm --output-format=github
- vendor/bin/ecs
- bin/console lint:twig templates --no-interaction --format=github
- bin/console lint:yaml . *.yaml --parse-tags --no-interaction --format=github
- bin/console lint:container --no-interaction
- bin/console lint:xliff translations --no-interaction --format=github
- composer validate composer.json --no-check-publish
- symfony security:check
# TODO: add more ci-checks
# vendor/bin/parallel-lint src public migrations config
# XDEBUG_MODE=off bin/composer-require-checker --no-interaction --config-file=$PWD/composer-require-checker.json
# vendor/bin/config-transformer --dry-run
# bin/console debug:translation --all --only-missing en
# vendor/bin/rector --dry-run
# vendor/bin/phpstan -v --memory-limit=1G {{ if output == "github" { "--error-format=github" } else { "" } }}
# cd .. && pnpm spectral lint openapi.yaml {{ if output == "github" { "--format=github-actions" } else { "" } }
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
# TODO: cache composer dependencies
# TODO: check why --ignore-platform-req=ext-redis is needed
- run: composer install --ignore-platform-req=ext-redis
- run: vendor/bin/ecs
- run: bin/console cache:warmup
- run: bin/console lint:twig templates -n --format=github
- run: composer validate composer.json --no-check-publish
- run: symfony security:check
# symfony security:check
# vendor/bin/parallel-lint src public migrations config
# composer validate composer.json --no-check-publish
# XDEBUG_MODE=off bin/composer-require-checker --no-interaction --config-file=$PWD/composer-require-checker.json
# vendor/bin/config-transformer --dry-run
# bin/console lint:container -n
# bin/console cache:warmup
# bin/console lint:twig templates -n {{ if output == "github" { "--format=github" } else { "" } }}
# bin/console lint:yaml . *.yaml --parse-tags -n {{ if output == "github" { "--format=github" } else { "" } }}
# bin/console debug:translation --all --only-missing en
# bin/console lint:xliff translations --no-interaction {{ if output == "github" { "--format=github" } else { "" } }}
# vendor/bin/rector --dry-run
# vendor/bin/php-cs-fixer fix --dry-run --diff
# vendor/bin/psalm {{ if output == "github" { "--output-format=github" } else { "" } }}
# vendor/bin/phpstan -v --memory-limit=1G {{ if output == "github" { "--error-format=github" } else { "" } }}
# cd .. && pnpm spectral lint openapi.yaml {{ if output == "github" { "--format=github-actions" } else { "" } }}

psalm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
- shell: nix-shell --pure --run "bash -euxo pipefail {0}"
run: |
# TODO: cache composer dependencies
# TODO: check why --ignore-platform-req=ext-redis is needed
composer install --ignore-platform-req=ext-redis
vendor/bin/psalm --output-format=github
- run: ${{ matrix.check }}

phpunit:
runs-on: ubuntu-latest
Expand Down

0 comments on commit e932822

Please sign in to comment.