2019-03-11 16:46:48 +00:00
|
|
|
dist: xenial
|
2013-05-12 21:15:35 +01:00
|
|
|
language: node_js
|
|
|
|
node_js:
|
2019-06-17 23:44:23 +02:00
|
|
|
- '12'
|
2019-03-11 21:41:55 +00:00
|
|
|
- '10'
|
|
|
|
- '8'
|
2019-03-11 16:46:48 +00:00
|
|
|
cache: yarn
|
|
|
|
services:
|
2019-03-11 21:41:55 +00:00
|
|
|
- mysql
|
2019-04-18 13:35:41 +01:00
|
|
|
# Don't run builds for renovate PRs
|
|
|
|
if: NOT head_branch =~ ^renovate
|
2013-10-29 20:54:37 +00:00
|
|
|
env:
|
2015-01-07 20:44:14 +00:00
|
|
|
matrix:
|
2019-03-11 21:41:55 +00:00
|
|
|
- DB=sqlite3 NODE_ENV=testing
|
|
|
|
- DB=mysql NODE_ENV=testing-mysql
|
2015-11-13 11:54:50 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
2019-03-11 21:41:55 +00:00
|
|
|
- node_js: '10'
|
|
|
|
env: TEST_SUITE=lint
|
2019-06-17 23:44:23 +02:00
|
|
|
allow_failures:
|
|
|
|
- node_js: '12'
|
2017-01-23 10:32:49 -05:00
|
|
|
install:
|
2019-06-18 00:00:03 +02:00
|
|
|
- if [ "$TRAVIS_NODE_VERSION" == "12" ]; then yarn --ignore-engines; else yarn; fi
|
2019-03-11 16:46:48 +00:00
|
|
|
before_script:
|
2019-03-11 21:41:55 +00:00
|
|
|
- if [ $DB == "mysql" ]; then mysql -e 'create database ghost_testing'; fi
|
2019-06-18 00:00:03 +02:00
|
|
|
- if [ "$DB" == "sqlite3" ]; then yarn add --ignore-engines --force sqlite3; fi
|
2019-01-22 18:31:07 +01:00
|
|
|
script: |
|
2019-03-11 16:39:17 +00:00
|
|
|
if [ "$TEST_SUITE" == "lint" ]; then
|
2019-03-11 15:43:47 +00:00
|
|
|
yarn lint
|
|
|
|
elif [[ "$TRAVIS_PULL_REQUEST_BRANCH" =~ ^renovate || "$TRAVIS_EVENT_TYPE" == "cron" ]]; then
|
|
|
|
yarn ci:regression
|
2019-01-22 18:31:07 +01:00
|
|
|
else
|
2019-03-11 15:43:47 +00:00
|
|
|
yarn ci
|
2019-01-22 18:31:07 +01:00
|
|
|
fi
|
2019-10-05 10:03:29 +05:30
|
|
|
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
|