Ghost/.travis.yml

39 lines
1.1 KiB
YAML
Raw Normal View History

2019-03-11 19:46:48 +03:00
dist: xenial
language: node_js
node_js:
- '12'
- '10'
- '8'
2019-03-11 19:46:48 +03:00
cache: yarn
services:
- mysql
# Don't run builds for renovate PRs
if: NOT head_branch =~ ^renovate
env:
matrix:
- DB=sqlite3 NODE_ENV=testing
- DB=mysql NODE_ENV=testing-mysql
matrix:
include:
- node_js: '10'
env: TEST_SUITE=lint
allow_failures:
- node_js: '12'
install:
- if [ "$TRAVIS_NODE_VERSION" == "12" ]; then yarn --ignore-engines; else yarn; fi
2019-03-11 19:46:48 +03:00
before_script:
- if [ $DB == "mysql" ]; then mysql -e 'create database ghost_testing'; fi
- if [ "$DB" == "sqlite3" ]; then yarn add --ignore-engines --force sqlite3; fi
script: |
2019-03-11 19:39:17 +03:00
if [ "$TEST_SUITE" == "lint" ]; then
yarn lint
elif [[ "$TRAVIS_PULL_REQUEST_BRANCH" =~ ^renovate || "$TRAVIS_EVENT_TYPE" == "cron" ]]; then
yarn ci:regression
else
yarn ci
fi
after_failure: |
if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then
curl -X POST --data-urlencode "payload={\"attachments\": [{\"color\": \"danger\", \"fallback\": \"Build Failure: $TRAVIS_JOB_WEB_URL\", \"title\": \"Build Failure\", \"text\": \"$TRAVIS_JOB_WEB_URL\"}]}" $SLACK_URL
fi