workflow test

This commit is contained in:
Brandon Shipley 2025-08-12 00:05:38 -07:00
parent 0181c48907
commit 452ec31ba7
Signed by: bmfs
GPG Key ID: 14E38571D8BB0DE4
1 changed files with 10 additions and 10 deletions

View File

@ -12,7 +12,8 @@ jobs:
fail-fast: false
matrix:
php-version: ['8.1', '8.4']
db-type: ['sqlite', 'mysql', 'pgsql']
db-type: ['mysql']
# db-type: ['sqlite', 'mysql', 'pgsql']
prefer-lowest: ['']
include:
- php-version: '8.1'
@ -20,12 +21,12 @@ jobs:
prefer-lowest: 'prefer-lowest'
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
# postgres:
# image: postgres
# ports:
# - 5432:5432
# env:
# POSTGRES_PASSWORD: postgres
mysql8:
image: mysql:8.0
env:
@ -45,7 +46,6 @@ jobs:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
apt-get update
apt install -y default-mysql-client
sleep 120
mysql -h mysql8 -u root -e 'CREATE DATABASE cakephp;'
- name: Setup PHP
@ -82,12 +82,12 @@ jobs:
- name: Wait for MySQL
if: matrix.db-type == 'mysql'
run: while ! `mysqladmin ping -h 127.0.0.1 --silent`; do printf 'Waiting for MySQL...\n'; sleep 2; done;
run: while ! `mysqladmin ping -h mysql8 --silent`; do printf 'Waiting for MySQL...\n'; sleep 2; done;
- name: Run PHPUnit
run: |
if [[ ${{ matrix.db-type }} == 'sqlite' ]]; then export DB_URL='sqlite:///:memory:'; fi
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:root@127.0.0.1/cakephp?encoding=utf8'; fi
if [[ ${{ matrix.db-type }} == 'mysql' ]]; then export DB_URL='mysql://root:root@mysql8/cakephp?encoding=utf8'; fi
if [[ ${{ matrix.db-type }} == 'pgsql' ]]; then export DB_URL='postgres://postgres:postgres@127.0.0.1/postgres'; fi
if [[ ${{ matrix.php-version }} == '8.1' ]]; then
vendor/bin/phpunit --coverage-clover=coverage.xml