mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Configured CI to only run MySQL container on MySQL tests
no issue - this saves about 50s on the SQLite tests
This commit is contained in:
parent
11682bb8a7
commit
d229cf83a4
1 changed files with 11 additions and 9 deletions
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
|
@ -20,15 +20,6 @@ jobs:
|
||||||
DB: ${{ matrix.env.DB }}
|
DB: ${{ matrix.env.DB }}
|
||||||
NODE_ENV: ${{ matrix.env.NODE_ENV }}
|
NODE_ENV: ${{ matrix.env.NODE_ENV }}
|
||||||
database__connection__password: root
|
database__connection__password: root
|
||||||
services:
|
|
||||||
mysql:
|
|
||||||
image: mysql:5.7
|
|
||||||
env:
|
|
||||||
MYSQL_ROOT_PASSWORD: root
|
|
||||||
MYSQL_DATABASE: ghost_testing
|
|
||||||
ports:
|
|
||||||
- 3306:3306
|
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
||||||
name: Node ${{ matrix.node }} - ${{ matrix.env.DB }}
|
name: Node ${{ matrix.node }} - ${{ matrix.env.DB }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -36,6 +27,17 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
|
|
||||||
|
- name: Shutdown MySQL
|
||||||
|
run: sudo service mysql stop
|
||||||
|
if: matrix.env.DB == 'mysql'
|
||||||
|
|
||||||
|
- uses: mirromutth/mysql-action@v1.1
|
||||||
|
if: matrix.env.DB == 'mysql'
|
||||||
|
with:
|
||||||
|
mysql version: '5.7'
|
||||||
|
mysql database: 'ghost_testing'
|
||||||
|
mysql root password: 'root'
|
||||||
|
|
||||||
- uses: Dreamcodeio/pr-has-label-action@master
|
- uses: Dreamcodeio/pr-has-label-action@master
|
||||||
id: allTestsLabel
|
id: allTestsLabel
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
|
|
Loading…
Add table
Reference in a new issue