Run tests on both MariaDB & MySQL
This commit is contained in:
parent
f5ca391400
commit
1ebcb2b7fb
1 changed files with 24 additions and 9 deletions
31
.github/workflows/tests.yml
vendored
31
.github/workflows/tests.yml
vendored
|
@ -1,17 +1,25 @@
|
|||
name: Run Test Suite
|
||||
name: run tests
|
||||
on:
|
||||
push:
|
||||
branch-ignore:
|
||||
- 'master'
|
||||
- 'release/**'
|
||||
branches-ignore:
|
||||
- master
|
||||
- "release/**"
|
||||
pull_request:
|
||||
jobs:
|
||||
integration_tests:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'ci skip')"
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10.2
|
||||
env:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||
MYSQL_DATABASE: panel_test
|
||||
ports:
|
||||
- 3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
image: mysql:8
|
||||
env:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||
MYSQL_DATABASE: panel_test
|
||||
|
@ -22,6 +30,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
php: [ 7.4, 8.0 ]
|
||||
database: [ mysql, mariadb ]
|
||||
name: PHP ${{ matrix.php }}
|
||||
steps:
|
||||
- name: checkout
|
||||
|
@ -59,9 +68,15 @@ jobs:
|
|||
env:
|
||||
DB_CONNECTION: testing
|
||||
TESTING_DB_HOST: UNIT_NO_DB
|
||||
- name: execute integration tests
|
||||
- name: execute integration tests (mysql)
|
||||
run: vendor/bin/phpunit tests/Integration
|
||||
if: ${{ always() }}
|
||||
if: "${{ matrix.database }} == 'mysql'"
|
||||
env:
|
||||
TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
|
||||
TESTING_DB_USERNAME: root
|
||||
- name: execute integration tests (mariadb)
|
||||
run: vendor/bin/phpunit tests/Integration
|
||||
if: "${{ matrix.database }} == 'mariadb'"
|
||||
env:
|
||||
TESTING_DB_PORT: ${{ job.services.mariadb.ports[3306] }}
|
||||
TESTING_DB_USERNAME: root
|
||||
|
|
Loading…
Reference in a new issue