Skip to content

Expiration Date

Expiration Date #51

Workflow file for this run

name: Symfony
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
symfony-tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0.33
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: glouton_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
# To automatically get bug fixes and new Php versions for shivammathur/setup-php,
# change this to (see https://github.com/shivammathur/setup-php#bookmark-versioning):
- uses: shivammathur/setup-php@v2
# uses: shivammathur/setup-php@2cb9b829437ee246e9b3cac53555a39208ca6d28
with:
php-version: '8.2'
- uses: actions/checkout@v4
- name: Copy .env.local
run: php -r "copy('.env.local', '.env');"
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Create Database
run: |
php bin/console doctrine:migrations:migrate --env=test --no-interaction
php bin/console doctrine:fixtures:load --env=test --no-interaction
- name: Run PHP CS Fixer
run: composer exec php-cs-fixer check
- name: Run PHPStan
run: vendor/bin/phpstan analyse src --level=max
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: |
vendor/bin/phpunit