2019-03-11 19:46:48 +03:00
|
|
|
dist: xenial
|
2013-05-13 00:15:35 +04:00
|
|
|
language: node_js
|
|
|
|
node_js:
|
2019-06-18 00:44:23 +03:00
|
|
|
- '12'
|
2019-03-12 00:41:55 +03:00
|
|
|
- '10'
|
|
|
|
- '8'
|
2019-03-11 19:46:48 +03:00
|
|
|
cache: yarn
|
|
|
|
services:
|
2019-03-12 00:41:55 +03:00
|
|
|
- mysql
|
2019-04-18 15:35:41 +03:00
|
|
|
# Don't run builds for renovate PRs
|
|
|
|
if: NOT head_branch =~ ^renovate
|
2013-10-30 00:54:37 +04:00
|
|
|
env:
|
2015-01-07 23:44:14 +03:00
|
|
|
matrix:
|
2019-03-12 00:41:55 +03:00
|
|
|
- DB=sqlite3 NODE_ENV=testing
|
|
|
|
- DB=mysql NODE_ENV=testing-mysql
|
2015-11-13 14:54:50 +03:00
|
|
|
matrix:
|
|
|
|
include:
|
2019-03-12 00:41:55 +03:00
|
|
|
- node_js: '10'
|
|
|
|
env: TEST_SUITE=lint
|
2019-06-18 00:44:23 +03:00
|
|
|
allow_failures:
|
|
|
|
- node_js: '12'
|
2017-01-23 18:32:49 +03:00
|
|
|
install:
|
2019-06-18 01:00:03 +03:00
|
|
|
- if [ "$TRAVIS_NODE_VERSION" == "12" ]; then yarn --ignore-engines; else yarn; fi
|
2019-03-11 19:46:48 +03:00
|
|
|
before_script:
|
2019-03-12 00:41:55 +03:00
|
|
|
- if [ $DB == "mysql" ]; then mysql -e 'create database ghost_testing'; fi
|
2019-06-18 01:00:03 +03:00
|
|
|
- if [ "$DB" == "sqlite3" ]; then yarn add --ignore-engines --force sqlite3; fi
|
2019-01-22 20:31:07 +03:00
|
|
|
script: |
|
2019-03-11 19:39:17 +03:00
|
|
|
if [ "$TEST_SUITE" == "lint" ]; then
|
2019-03-11 18:43:47 +03:00
|
|
|
yarn lint
|
|
|
|
elif [[ "$TRAVIS_PULL_REQUEST_BRANCH" =~ ^renovate || "$TRAVIS_EVENT_TYPE" == "cron" ]]; then
|
|
|
|
yarn ci:regression
|
2019-01-22 20:31:07 +03:00
|
|
|
else
|
2019-03-11 18:43:47 +03:00
|
|
|
yarn ci
|
2019-01-22 20:31:07 +03:00
|
|
|
fi
|
2019-10-05 07:33:29 +03:00
|
|
|
notifications:
|
|
|
|
slack:
|
|
|
|
if: type = cron
|
|
|
|
rooms:
|
|
|
|
- secure: KzvGpf6RFHgQ3BkppKM4OejFjJYxH60KkDDShet0a0v+j/03HF5Nx0S0Vl9O/F2dPt2qWvblKb3j9EKgB7RsoFSdZuOk7ijA9Duvn+p9RrLom0C9JxOA3ob065WAGyE0OGRm1P5H98loX/L+6oOHC4/qqGKXgz6gUdBtZBn/yo8=
|
|
|
|
on_success: change
|
|
|
|
on_failure: always
|
|
|
|
on_pull_requests: false
|