Skip to content

Symfony 7.3 and PHP 8.4 #526

Symfony 7.3 and PHP 8.4

Symfony 7.3 and PHP 8.4 #526

Workflow file for this run

on:
pull_request:
name: Review
env:
COMPOSE_USER: root
jobs:
test-composer-install:
runs-on: ubuntu-latest
name: Composer install
steps:
- uses: actions/checkout@v4
# https://taskfile.dev/installation/#github-actions
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Start docker compose setup
run: |
docker network create frontend
task compose -- up --detach
- name: Validate composer files
run: |
task composer -- validate composer.json --strict
- name: Composer install with exported .env variables
run: |
docker compose --env-file .env exec --env APP_ENV=prod phpfpm composer install --no-dev --optimize-autoloader
test-suite:
name: Test suite (${{ matrix.php }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Start docker compose setup
run: |
docker network create frontend
task compose -- up --detach
- name: Install Dependencies
run: |
task composer -- install
- name: Test suite
run: |
task test
- name: Upload coverage to Codecov test
uses: codecov/codecov-action@v4
with:
files: ./coverage/unit.xml
flags: unittests, ${{ matrix.php }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
phpstan:
name: PHPStan (${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["8.4"]
prefer: [prefer-stable]
steps:
- uses: actions/checkout@v4
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Start docker compose setup
run: |
docker network create frontend
task compose -- up --detach
- name: Install Dependencies
run: |
task composer -- install
- name: Run PHPStan
run: |
task code-analysis:phpstan
validate-doctrine-schema:
runs-on: ubuntu-latest
name: Validate Doctrine Schema
steps:
- uses: actions/checkout@v4
- name: Install Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/mxschmitt/action-tmate?tab=readme-ov-file#manually-triggered-debug
# Enable tmate debugging if debug logging is enabled (cf.
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context)
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: false
if: 1 == runner.debug
- name: Install site
run: |
docker network create frontend
task site:update
- name: Validate Doctrine schema
run: |
task console -- doctrine:schema:validate