[Configuration] Add "url" connection configuration key #84
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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
if: ${{ !github.event.act }} | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8 | |
env: | |
MYSQL_ROOT_PASSWORD: symandy | |
MYSQL_DATABASE: db_test_1 | |
ports: | |
- 3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
strategy: | |
matrix: | |
php-version: | |
- 8.1 | |
- 8.2 | |
steps: | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mysql | |
- uses: actions/checkout@v3 | |
- 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 update -q --no-ansi --no-interaction --no-progress | |
- name: Run static analysis | |
run: composer run-script analyse | |
- name: Execute tests (Unit tests) via PHPUnit | |
env: | |
SYMFONY_DEPRECATIONS_HELPER: 'max[direct]=0' | |
TEST_DATABASE_USER: root | |
TEST_DATABASE_PASSWORD: symandy | |
TEST_DATABASE_PORT: ${{ job.services.mysql.ports['3306'] }} | |
TEST_DATABASE_NAME: db_test_1 | |
TEST_DATABASE_URL: mysql://root:symandy@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/db_test_2 | |
run: composer run-script test |