Skip to content

feat: framework refactor + decouple from Hyperf #71

feat: framework refactor + decouple from Hyperf

feat: framework refactor + decouple from Hyperf #71

Workflow file for this run

name: databases
on:
push:
pull_request:
jobs:
mysql_8:
runs-on: ubuntu-latest
timeout-minutes: 5
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -h localhost"
--health-interval 10s
--health-timeout 5s
--health-retries 5
container:
image: phpswoole/swoole:6.1.4-php8.4
strategy:
fail-fast: true
name: MySQL 8.0
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-
- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute integration tests
env:
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database
mysql_9:
runs-on: ubuntu-latest
timeout-minutes: 5
services:
mysql:
image: mysql:9.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping -h localhost"
--health-interval 10s
--health-timeout 5s
--health-retries 5
container:
image: phpswoole/swoole:6.1.4-php8.4
strategy:
fail-fast: true
name: MySQL 9.0
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-
- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute integration tests
env:
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database
mariadb_10:
runs-on: ubuntu-latest
timeout-minutes: 5
services:
mariadb:
image: mariadb:10
env:
MARIADB_ROOT_PASSWORD: password
MARIADB_DATABASE: testing
ports:
- 3306:3306
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 5
container:
image: phpswoole/swoole:6.1.4-php8.4
strategy:
fail-fast: true
name: MariaDB 10
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-
- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute integration tests
env:
DB_CONNECTION: mariadb
DB_HOST: mariadb
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database
mariadb_11:
runs-on: ubuntu-latest
timeout-minutes: 5
services:
mariadb:
image: mariadb:11
env:
MARIADB_ROOT_PASSWORD: password
MARIADB_DATABASE: testing
ports:
- 3306:3306
options: >-
--health-cmd "healthcheck.sh --connect --innodb_initialized"
--health-interval 10s
--health-timeout 5s
--health-retries 5
container:
image: phpswoole/swoole:6.1.4-php8.4
strategy:
fail-fast: true
name: MariaDB 11
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-
- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute integration tests
env:
DB_CONNECTION: mariadb
DB_HOST: mariadb
DB_PORT: 3306
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database
pgsql_17:
runs-on: ubuntu-latest
timeout-minutes: 5
services:
postgres:
image: postgres:17
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: testing
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
container:
image: phpswoole/swoole:6.1.4-php8.4
strategy:
fail-fast: true
name: PostgreSQL 17
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-
- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute integration tests
env:
DB_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: testing
DB_USERNAME: postgres
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database
pgsql_18:
runs-on: ubuntu-latest
timeout-minutes: 5
services:
postgres:
image: postgres:18
env:
POSTGRES_PASSWORD: password
POSTGRES_DB: testing
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
container:
image: phpswoole/swoole:6.1.4-php8.4
strategy:
fail-fast: true
name: PostgreSQL 18
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-
- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute integration tests
env:
DB_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: testing
DB_USERNAME: postgres
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Integration/Database
sqlite:
runs-on: ubuntu-latest
timeout-minutes: 5
container:
image: phpswoole/swoole:6.1.4-php8.4
strategy:
fail-fast: true
name: SQLite
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: /root/.composer/cache
key: composer-8.4-${{ hashFiles('composer.lock') }}
restore-keys: composer-8.4-
- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist -n -o
- name: Execute integration tests
env:
DB_CONNECTION: sqlite
DB_DATABASE: /tmp/testing.sqlite
run: |
touch /tmp/testing.sqlite
vendor/bin/phpunit tests/Integration/Database