base it off of xorm gitea action mysql8 test
CI / testsuite (mysql, 8.1, ) (push) Failing after 6m3s Details
CI / testsuite (mysql, 8.4, ) (push) Failing after 5m36s Details
CI / testsuite (sqlite, 8.1, prefer-lowest) (push) Failing after 6m8s Details
CI / Coding Standard & Static Analysis (push) Failing after 5m46s Details

This commit is contained in:
Brandon Shipley 2025-08-12 00:43:28 -07:00
parent bfa8f8c9fd
commit 003f5d17f1
Signed by: bmfs
GPG Key ID: 14E38571D8BB0DE4
1 changed files with 20 additions and 26 deletions

View File

@ -21,33 +21,28 @@ jobs:
prefer-lowest: 'prefer-lowest'
services:
mysql8:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: cakephp
# services:
# postgres:
# image: postgres
# ports:
# - 5432:5432
# env:
# POSTGRES_PASSWORD: postgres
mysql8:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test_db
ports:
- 3306:3306
# mysql8:
# image: mysql:8.0
# env:
# MYSQL_ALLOW_EMPTY_PASSWORD: yes
# MYSQL_DATABASE: test_db
# ports:
# - 3306:3306
steps:
- uses: actions/checkout@v4
- name: Setup Service
if: matrix.db-type == 'mysql'
run: |
apt-get update && apt-get install -y lsb-release inetutils-tools
wget https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb
DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.24-1_all.deb
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
apt-get update
apt install -y default-mysql-client
mysql -h mysql8 -u root -e 'CREATE DATABASE cakephp;'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
@ -80,15 +75,15 @@ jobs:
if: matrix.db-type == 'mysql'
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Wait for MySQL
if: matrix.db-type == 'mysql'
run: while ! `mysqladmin ping -h mysql8 --silent`; do printf 'Waiting for MySQL...\n'; sleep 2; done;
- name: Run PHPUnit
- name: Run PHPUnit tests
env:
TEST_MYSQL_HOST: mysql8
TEST_MYSQL_CHARSET: utf8mb4
TEST_MYSQL_DBNAME: cakephp
TEST_MYSQL_USERNAME: root
TEST_MYSQL_PASSWORD:
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@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
else
@ -111,7 +106,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: