feat: mark current page in menu #569
Workflow file for this run
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: Symfony | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
env: | |
XDEBUG_MODE: coverage | |
jobs: | |
# Run security checks ———————————————————————————————————————————————————————— | |
security: | |
strategy: | |
fail-fast: true | |
matrix: | |
php-versions: ['8.2'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- uses: actions/checkout@v3 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Audit the code for security vulnerabilities | |
run: composer audit | |
# Run tests —————————————————————————————————————————————————————————————————— | |
symfony-tests: | |
strategy: | |
fail-fast: true | |
matrix: | |
php-versions: ['8.2', '8.3', '8.4'] | |
runs-on: ubuntu-latest | |
# Setup ———————————————————————————————————————————————————————————————— | |
steps: | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: xdebug | |
tools: castor | |
- uses: actions/checkout@v3 | |
# Composer ————————————————————————————————————————————————————————————— | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
# Tests ———————————————————————————————————————————————————————————————— | |
- name: Execute tests via PHPUnit | |
run: castor test | |
# Code coverage ———————————————————————————————————————————————————————— | |
- name: Generate the code coverage report and show the current global coverage | |
run: castor coverage | |
# Run all lint/CS checks ————————————————————————————————————————————————————— | |
symfony-lint: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup ———————————————————————————————————————————————————————————————— | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
tools: cs2pr, castor | |
- uses: actions/checkout@v3 | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer- | |
- name: Install PHP dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Install PHPUnit dependencies for PHPStan | |
run: vendor/bin/phpunit --version | |
# Native Symfony lints ————————————————————————————————————————————————— | |
- name: Lint the DI container | |
run: castor lint:container | |
- name: Lint Twig templates | |
run: castor lint:twig | |
- name: Lint Yaml files | |
run: castor lint:yaml | |
# Vendors —————————————————————————————————————————————————————————————— | |
- name: Lint PHP with php-cs-fixer | |
run: castor lint:php | |
- name: PHPStan static analysis | |
run: castor stan | |
# The end. 🙃 |