mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-03-22 15:45:54 +07:00
Update examples
This commit is contained in:
@@ -5,11 +5,13 @@ jobs:
|
||||
symfony:
|
||||
name: Symfony (PHP ${{ matrix.php-versions }})
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
APP_ENV: test
|
||||
|
||||
# Docs: https://docs.github.com/en/actions/using-containerized-services
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
image: mysql:8.4
|
||||
env:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||
MYSQL_ROOT_PASSWORD: symfony
|
||||
@@ -20,7 +22,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['7.4', '8.0', '8.1']
|
||||
php-versions: ['8.4', '8.5', '8.6']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
@@ -30,7 +32,6 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: phpunit-bridge
|
||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
|
||||
coverage: xdebug
|
||||
|
||||
@@ -53,18 +54,17 @@ jobs:
|
||||
restore-keys: ${{ runner.os }}-composer-
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||
run: composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader
|
||||
|
||||
- name: Run Migration
|
||||
- name: Prepare database
|
||||
run: |
|
||||
composer require --dev symfony/orm-pack
|
||||
php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
|
||||
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
|
||||
php bin/console doctrine:database:create --if-not-exists --no-interaction
|
||||
php bin/console doctrine:schema:create --no-interaction
|
||||
php bin/console doctrine:fixtures:load --no-interaction
|
||||
env:
|
||||
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
|
||||
|
||||
- name: Install PHPUnit
|
||||
run: simple-phpunit install
|
||||
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony?serverVersion=8.4&charset=utf8mb4
|
||||
|
||||
- name: Run tests
|
||||
run: simple-phpunit --coverage-text
|
||||
run: php bin/phpunit --coverage-text
|
||||
env:
|
||||
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony?serverVersion=8.4&charset=utf8mb4
|
||||
|
||||
Reference in New Issue
Block a user