mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03: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
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/'))
|
||||
strategy:
|
||||
matrix:
|
||||
DB: ['sqlite3', 'mysql']
|
||||
env:
|
||||
- DB: sqlite3
|
||||
DB_CLIENT: sqlite3
|
||||
- DB: mysql5
|
||||
DB_CLIENT: mysql
|
||||
- DB: mysql8
|
||||
DB_CLIENT: mysql
|
||||
env:
|
||||
database__client: ${{ matrix.DB }}
|
||||
database__client: ${{ matrix.env.DB_CLIENT }}
|
||||
database__connection__filename: /dev/shm/ghost-test.db
|
||||
database__connection__host: 127.0.0.1
|
||||
database__connection__user: root
|
||||
database__connection__password: root
|
||||
database__connection__database: ghost_testing
|
||||
name: Migrations - ${{ matrix.DB }}
|
||||
name: Migrations - ${{ matrix.env.DB }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
@ -63,15 +69,22 @@ jobs:
|
||||
|
||||
- name: Shutdown MySQL
|
||||
run: sudo service mysql stop
|
||||
if: matrix.DB == 'mysql'
|
||||
if: matrix.env.DB == 'mysql5' || matrix.env.DB == 'mysql8'
|
||||
|
||||
- uses: mirromutth/mysql-action@v1.1
|
||||
if: matrix.DB == 'mysql'
|
||||
- uses: daniellockyer/mysql-action@main
|
||||
if: matrix.env.DB == 'mysql5'
|
||||
with:
|
||||
mysql version: '5.7'
|
||||
mysql database: 'ghost_testing'
|
||||
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: |
|
||||
node index.js &
|
||||
@ -89,7 +102,9 @@ jobs:
|
||||
env:
|
||||
- DB: sqlite3
|
||||
NODE_ENV: testing
|
||||
- DB: mysql
|
||||
- DB: mysql5
|
||||
NODE_ENV: testing-mysql
|
||||
- DB: mysql8
|
||||
NODE_ENV: testing-mysql
|
||||
env:
|
||||
DB: ${{ matrix.env.DB }}
|
||||
@ -107,15 +122,22 @@ jobs:
|
||||
|
||||
- name: Shutdown MySQL
|
||||
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
|
||||
if: matrix.env.DB == 'mysql'
|
||||
- uses: daniellockyer/mysql-action@main
|
||||
if: matrix.env.DB == 'mysql5'
|
||||
with:
|
||||
mysql version: '5.7'
|
||||
mysql database: 'ghost_testing'
|
||||
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: date +%s > ${{ runner.temp }}/startTime # Get start time for test suite
|
||||
|
Loading…
Reference in New Issue
Block a user