feature #615 [Blog][Team] Added meta members (ogizanagi) #2450
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: | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: 'Tests' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
# https://github.com/actions/setup-node | |
- name: 'Setup node' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: 'Setup PHP' | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: "none" | |
ini-values: "memory_limit=-1" | |
php-version: "8.3" | |
- name: 'Cache resized images' | |
uses: actions/cache@v3 | |
with: | |
path: public/resized | |
key: resized-images-${{ github.workflow }}-${{ secrets.CACHE_VERSION }} | |
- name: 'Determine composer cache directory' | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: 'Cache composer dependencies' | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- 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 --no-fund | |
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 --ansi --no-interaction | |
- name: 'Lint YAML' | |
if: always() && steps.deps.outcome == 'success' | |
run: bin/console lint:yaml config translations --parse-tags --ansi --no-interaction | |
- name: 'Lint Twig' | |
if: always() && steps.deps.outcome == 'success' | |
run: bin/console lint:twig templates --show-deprecations --ansi --no-interaction | |
- name: 'Lint JS' | |
if: always() && steps.deps.outcome == 'success' | |
run: npm run lint | |
- name: 'Lint Parameters and Services' | |
if: always() && steps.deps.outcome == 'success' | |
run: bin/console lint:container --ansi --no-interaction | |
- name: 'PHP CS Fixer' | |
if: always() && steps.deps.outcome == 'success' | |
run: vendor/bin/php-cs-fixer fix --dry-run --diff | |
- name: 'PhpStan' | |
if: always() && steps.deps.outcome == 'success' | |
run: vendor/bin/phpstan --no-progress --no-interaction analyse | |
env: | |
APP_ENV: test | |
# - name: Run tests | |
# run: vendor/bin/simple-phpunit --testdox | |
- name: 'Check build static' | |
run: | | |
npx encore production --color | |
bin/console stenope:build --no-interaction -vv --ansi | |
env: | |
APP_ENV: prod | |
- name: 'Check redirections generation' | |
run: | | |
bin/console app:generate-redirections --target=site --no-interaction -vv --ansi | |
bin/console app:generate-redirections --target=blog --no-interaction -vv --ansi | |
env: | |
APP_ENV: prod | |
ROUTER_DEFAULT_URI: https://elao.github.io/elao_ |