Upgrade to Symfony 6.4 & Asset Mapper #21
This file contains 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: Tests | |
on: | |
workflow_dispatch: ~ | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
tests: | |
name: 'Tests' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
- name: 'Setup node' | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: "none" | |
ini-values: "memory_limit=-1" | |
php-version: "8.1" | |
tools: symfony | |
- name: 'Determine composer cache directory' | |
id: composer-cache | |
run: echo "::set-output name=directory::$(composer config cache-dir)" | |
- name: 'Cache composer dependencies' | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.directory }} | |
key: composer-${{ hashFiles('composer.lock') }} | |
- name: 'Cache resized images' | |
uses: actions/cache@v2 | |
with: | |
path: public/resized | |
key: resized-images-tests-${{ secrets.CACHE_VERSION }} | |
- name: 'Cache blurhash images' | |
uses: actions/cache@v2 | |
with: | |
path: var/cache/pools/app | |
key: resized-blurhash-tests-${{ secrets.CACHE_VERSION }} | |
- name: 'Install dependencies' | |
id: deps | |
run: | | |
echo "::group::composer install" | |
composer install --no-progress --ansi | |
echo "::endgroup::" | |
# echo "::group::install phpunit" | |
# vendor/bin/simple-phpunit install | |
# echo "::endgroup::" | |
echo "::group::npm install" | |
npm install --color=always --no-progress --no-audit | |
echo "::endgroup::" | |
- name: 'Warmup' | |
run: | | |
bin/console cache:clear --ansi --no-warmup | |
bin/console cache:warmup --ansi | |
env: | |
APP_ENV: test | |
- name: 'Composer validate' | |
if: always() && steps.deps.outcome == 'success' | |
run: composer validate --no-check-publish | |
- name: 'Lint YAML' | |
if: always() && steps.deps.outcome == 'success' | |
run: make lint.yaml@integration | |
- name: 'Lint Twig' | |
if: always() && steps.deps.outcome == 'success' | |
run: make lint.yaml@integration | |
- name: 'Lint JS' | |
if: always() && steps.deps.outcome == 'success' | |
run: make lint.eslint@integration | |
- name: 'Lint Parameters and Services' | |
if: always() && steps.deps.outcome == 'success' | |
run: make lint.container@integration | |
- name: 'PHP CS Fixer' | |
if: always() && steps.deps.outcome == 'success' | |
run: make lint.php-cs-fixer@integration | |
- name: 'PhpStan' | |
if: always() && steps.deps.outcome == 'success' | |
run: make lint.phpstan@integration | |
# - name: Run tests | |
# run: vendor/bin/simple-phpunit --testdox | |
- name: 'Check build static' | |
run: | | |
bin/console sass:build --ansi | |
bin/console asset-map:compile --ansi | |
bin/console stenope:build --no-interaction -vvv --ansi | |
env: | |
APP_ENV: prod | |
NODE_ENV: production |