mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added MySQL 8 to CI tests
refs https://github.com/TryGhost/Toolbox/issues/181 - we officially support MySQL 8 but we don't run tests for it -- oops - this commit adds MySQL 8 to the DB matrix in CI tests - I had to switch to a fork of the `mysql-action` repo so I could get the native authentication plugin working, but I expect to revert this once we've merged support for mysql2
This commit is contained in:
parent
b55b9741e5
commit
2122a47ce0
1 changed files with 32 additions and 10 deletions
42
.github/workflows/test.yml
vendored
42
.github/workflows/test.yml
vendored
|
@ -40,15 +40,21 @@ jobs:
|
||||||
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
DB: ['sqlite3', 'mysql']
|
env:
|
||||||
|
- DB: sqlite3
|
||||||
|
DB_CLIENT: sqlite3
|
||||||
|
- DB: mysql5
|
||||||
|
DB_CLIENT: mysql
|
||||||
|
- DB: mysql8
|
||||||
|
DB_CLIENT: mysql
|
||||||
env:
|
env:
|
||||||
database__client: ${{ matrix.DB }}
|
database__client: ${{ matrix.env.DB_CLIENT }}
|
||||||
database__connection__filename: /dev/shm/ghost-test.db
|
database__connection__filename: /dev/shm/ghost-test.db
|
||||||
database__connection__host: 127.0.0.1
|
database__connection__host: 127.0.0.1
|
||||||
database__connection__user: root
|
database__connection__user: root
|
||||||
database__connection__password: root
|
database__connection__password: root
|
||||||
database__connection__database: ghost_testing
|
database__connection__database: ghost_testing
|
||||||
name: Migrations - ${{ matrix.DB }}
|
name: Migrations - ${{ matrix.env.DB }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -63,15 +69,22 @@ jobs:
|
||||||
|
|
||||||
- name: Shutdown MySQL
|
- name: Shutdown MySQL
|
||||||
run: sudo service mysql stop
|
run: sudo service mysql stop
|
||||||
if: matrix.DB == 'mysql'
|
if: matrix.env.DB == 'mysql5' || matrix.env.DB == 'mysql8'
|
||||||
|
|
||||||
- uses: mirromutth/mysql-action@v1.1
|
- uses: daniellockyer/mysql-action@main
|
||||||
if: matrix.DB == 'mysql'
|
if: matrix.env.DB == 'mysql5'
|
||||||
with:
|
with:
|
||||||
mysql version: '5.7'
|
mysql version: '5.7'
|
||||||
mysql database: 'ghost_testing'
|
mysql database: 'ghost_testing'
|
||||||
mysql root password: 'root'
|
mysql root password: 'root'
|
||||||
|
|
||||||
|
- uses: daniellockyer/mysql-action@main
|
||||||
|
if: matrix.env.DB == 'mysql8'
|
||||||
|
with:
|
||||||
|
mysql version: '8.0'
|
||||||
|
mysql database: 'ghost_testing'
|
||||||
|
mysql root password: 'root'
|
||||||
|
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: |
|
- run: |
|
||||||
node index.js &
|
node index.js &
|
||||||
|
@ -89,7 +102,9 @@ jobs:
|
||||||
env:
|
env:
|
||||||
- DB: sqlite3
|
- DB: sqlite3
|
||||||
NODE_ENV: testing
|
NODE_ENV: testing
|
||||||
- DB: mysql
|
- DB: mysql5
|
||||||
|
NODE_ENV: testing-mysql
|
||||||
|
- DB: mysql8
|
||||||
NODE_ENV: testing-mysql
|
NODE_ENV: testing-mysql
|
||||||
env:
|
env:
|
||||||
DB: ${{ matrix.env.DB }}
|
DB: ${{ matrix.env.DB }}
|
||||||
|
@ -107,15 +122,22 @@ jobs:
|
||||||
|
|
||||||
- name: Shutdown MySQL
|
- name: Shutdown MySQL
|
||||||
run: sudo service mysql stop
|
run: sudo service mysql stop
|
||||||
if: matrix.env.DB == 'mysql'
|
if: matrix.env.DB == 'mysql5' || matrix.env.DB == 'mysql8'
|
||||||
|
|
||||||
- uses: mirromutth/mysql-action@v1.1
|
- uses: daniellockyer/mysql-action@main
|
||||||
if: matrix.env.DB == 'mysql'
|
if: matrix.env.DB == 'mysql5'
|
||||||
with:
|
with:
|
||||||
mysql version: '5.7'
|
mysql version: '5.7'
|
||||||
mysql database: 'ghost_testing'
|
mysql database: 'ghost_testing'
|
||||||
mysql root password: 'root'
|
mysql root password: 'root'
|
||||||
|
|
||||||
|
- uses: daniellockyer/mysql-action@main
|
||||||
|
if: matrix.env.DB == 'mysql8'
|
||||||
|
with:
|
||||||
|
mysql version: '8.0'
|
||||||
|
mysql database: 'ghost_testing'
|
||||||
|
mysql root password: 'root'
|
||||||
|
|
||||||
- run: yarn
|
- run: yarn
|
||||||
|
|
||||||
- run: date +%s > ${{ runner.temp }}/startTime # Get start time for test suite
|
- run: date +%s > ${{ runner.temp }}/startTime # Get start time for test suite
|
||||||
|
|
Loading…
Add table
Reference in a new issue