2020-02-24 23:05:19 +03:00
|
|
|
name: Test Suite
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- 2.x
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node: [ 10, 12 ]
|
|
|
|
env:
|
|
|
|
- DB: sqlite3
|
|
|
|
NODE_ENV: testing
|
|
|
|
- DB: mysql
|
|
|
|
NODE_ENV: testing-mysql
|
|
|
|
env:
|
|
|
|
DB: ${{ matrix.env.DB }}
|
|
|
|
NODE_ENV: ${{ matrix.env.NODE_ENV }}
|
|
|
|
database__connection__password: root
|
|
|
|
name: Node ${{ matrix.node }} - ${{ matrix.env.DB }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
2020-03-19 22:19:00 +03:00
|
|
|
|
2020-03-20 14:05:16 +03:00
|
|
|
- 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'
|
|
|
|
|
2020-02-24 23:05:19 +03:00
|
|
|
- run: yarn
|
2020-03-17 15:46:03 +03:00
|
|
|
- run: yarn lint
|
2020-02-24 23:05:19 +03:00
|
|
|
- run: grunt test-acceptance --verbose
|
|
|
|
- run: grunt test-unit --verbose
|
|
|
|
- run: grunt test-regression --verbose
|
2020-03-25 19:18:03 +03:00
|
|
|
if: startsWith(github.head_ref, 'renovate/') || github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'all-tests')
|