2020-02-24 23:05:19 +03:00
|
|
|
name: Test Suite
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- 2.x
|
2020-03-25 20:18:18 +03:00
|
|
|
- 'renovate/*'
|
2020-04-16 13:01:27 +03:00
|
|
|
env:
|
|
|
|
FORCE_COLOR: 1
|
2020-02-24 23:05:19 +03:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
2020-03-25 20:18:18 +03:00
|
|
|
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
2020-02-24 23:05:19 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-05-08 09:40:51 +03:00
|
|
|
node: [ '10.13.0', '12.10.0' ]
|
2020-02-24 23:05:19 +03:00
|
|
|
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-04-16 09:36:15 +03:00
|
|
|
|
2020-06-10 10:58:35 +03:00
|
|
|
- uses: daniellockyer/action-slack-build@master
|
|
|
|
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
2020-06-09 15:21:43 +03:00
|
|
|
|
2020-04-16 09:36:15 +03:00
|
|
|
ghost-cli:
|
|
|
|
name: Ghost-CLI
|
2020-04-16 12:22:14 +03:00
|
|
|
if: github.event_name == 'push' || (github.event_name == 'pull_request' && !startsWith(github.head_ref, 'renovate/'))
|
2020-04-16 09:36:15 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: true
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
2020-05-08 09:40:51 +03:00
|
|
|
node-version: '10.13.0'
|
2020-05-28 14:59:08 +03:00
|
|
|
- run: npm install -g ghost-cli@latest
|
2020-04-16 09:36:15 +03:00
|
|
|
- run: zip -r ghost.zip .
|
|
|
|
|
|
|
|
- name: Clean Install
|
|
|
|
run: |
|
|
|
|
DIR=$(mktemp -d)
|
|
|
|
ghost install local -d $DIR --zip $GITHUB_WORKSPACE/ghost.zip
|
|
|
|
|
|
|
|
- name: Latest Release
|
|
|
|
run: |
|
|
|
|
DIR=$(mktemp -d)
|
|
|
|
ghost install local -d $DIR
|
|
|
|
ghost update -d $DIR --zip $GITHUB_WORKSPACE/ghost.zip
|
|
|
|
|
|
|
|
- name: Previous Major
|
|
|
|
run: |
|
|
|
|
DIR=$(mktemp -d)
|
|
|
|
ghost install v2 --local -d $DIR
|
|
|
|
ghost update -f -d $DIR --zip $GITHUB_WORKSPACE/ghost.zip
|
2020-06-09 15:21:43 +03:00
|
|
|
|
2020-06-10 10:58:35 +03:00
|
|
|
- uses: daniellockyer/action-slack-build@master
|
|
|
|
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master'
|
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|