Skip to content

Update symfony.yml

Update symfony.yml #24

Workflow file for this run

name: Symfony
on:
push:
branches:
- "*" # Toutes les branches
pull_request:
branches:
- "*" # Toutes les branches
permissions:
contents: read
jobs:
symfony-tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.2'] # Matrice avec plusieurs versions de PHP
services:
db_certification: # Utiliser le nom du service tel qu'il est dans docker-compose
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: db_certification
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping --silent" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Install Composer Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Cache Composer packages
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-
- name: Run Doctrine Migrations
run: php bin/console doctrine:migrations:migrate --no-interaction
- name: Load Schema (if migrations are not available)
run: php bin/console doctrine:schema:update --force
- name: Execute tests (Unit and Feature tests)
run: php bin/phpunit