Integrate FrankenPHP #354
Workflow file for this run
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: Testing with MySQL | |
on: [push, pull_request] | |
jobs: | |
symfony: | |
name: Symfony (PHP ${{ matrix.php-versions }}) | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: false | |
MYSQL_ROOT_PASSWORD: symfony | |
MYSQL_DATABASE: symfony | |
ports: | |
- 3306/tcp | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.2'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Docs: https://github.com/shivammathur/setup-php | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, xml, ctype, gd, iconv, intl, pdo_sqlite | |
coverage: xdebug #optional | |
- name: Start mysql service | |
run: sudo systemctl start mysql | |
- name: Get composer cache directory | |
id: composercache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache composer dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: | | |
composer update symfony/flex --no-plugins --no-scripts | |
composer install --no-progress --prefer-dist --optimize-autoloader | |
- name: Run Migration | |
run: | | |
php bin/console app:install | |
env: | |
DATABASE_URL: mysql://root:[email protected]:${{ job.services.mysql.ports[3306] }}/symfony?serverVersion=5.7 | |
- name: Run Tests | |
env: | |
DATABASE_URL: mysql://root:[email protected]:${{ job.services.mysql.ports[3306] }}/symfony?serverVersion=5.7 | |
PANTHER_APP_ENV: test | |
run: php bin/phpunit --coverage-text |