This commit is contained in:
27
.github/workflows/phpunit.yml
vendored
27
.github/workflows/phpunit.yml
vendored
@ -9,6 +9,22 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.4
|
||||
env:
|
||||
MYSQL_DATABASE: nat_as_test
|
||||
MYSQL_USER: nat_as_test
|
||||
MYSQL_PASSWORD: test-password
|
||||
MYSQL_ROOT_PASSWORD: root-password
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: >-
|
||||
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot-password"
|
||||
--health-interval=5s
|
||||
--health-timeout=5s
|
||||
--health-retries=20
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@ -16,7 +32,7 @@ jobs:
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.2'
|
||||
extensions: json, openssl, pdo, pdo_sqlite, zip
|
||||
extensions: json, openssl, pdo, pdo_mysql, pdo_sqlite, zip
|
||||
coverage: pcov
|
||||
tools: composer:v2
|
||||
|
||||
@ -25,3 +41,12 @@ jobs:
|
||||
|
||||
- name: Run tests with coverage floor
|
||||
run: php tests/check-coverage.php 40
|
||||
|
||||
- name: Run MySQL schema smoke test
|
||||
env:
|
||||
QDB_MYSQL_HOST: 127.0.0.1
|
||||
QDB_MYSQL_PORT: 3306
|
||||
QDB_MYSQL_DATABASE: nat_as_test
|
||||
QDB_MYSQL_USER: nat_as_test
|
||||
QDB_MYSQL_PASSWORD: test-password
|
||||
run: php tests/mysql_smoke.php
|
||||
|
||||
Reference in New Issue
Block a user