add svg user profile #42
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: | |
- "*" # 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: # Utiliser le nom du service tel qu'il est dans docker-compose | |
image: mysql:5.7 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' | |
MYSQL_DATABASE: certification | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping --silent" --health-interval=10s --health-timeout=5s --health-retries=3 | |
node: | |
image: node:20 # Choisissez la version de Node.js souhaitée | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Copy .env.test.local | |
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');" | |
- 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: Create .env.test.local | |
run: | | |
cp .env .env.test.local | |
echo "DATABASE_URL=mysql://root:@127.0.0.1:3306/certification?serverVersion=8.3" >> .env.test.local | |
- name: Run Doctrine Migrations | |
run: php bin/console doctrine:database:create --env=test --no-interaction | |
- name: Run Doctrine Migrations | |
run: php bin/console doctrine:migrations:migrate --env=test --no-interaction | |
- name: Load Schema (if migrations are not available) | |
run: php bin/console doctrine:schema:update --env=test --force | |
- name: Install theme | |
run: npm install | |
- name: Compile theme | |
run: npm run build | |
- name: Execute tests (Unit and Feature tests) | |
run: php bin/phpunit |