Permalink
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (46 sloc) 1.69 KB
sudo: false
dist: "trusty"
language: "node_js"
addons:
apt:
packages:
- "python3"
- "python3-pip"
env:
global:
# GH_TOKEN and NPM_TOKEN encrypted by 'travis encrypt' utility
- secure: "gO5DrzOfF+l3hjvs0kLYUrGEnYVwrDy7NTGNrtPmLrrfdS6qmUNbTVggjra2aDM82lZYo0slZaOtjedSd8GMNE41egHAq0aGMJfhNrXjr+ROOIkc1BRUn3vTp5lk/n4eU7bLozoiriBphmKHHwZqekSn2orvIpAtoWL/JPVzheY="
cache:
directories:
- "node_modules"
before_install:
# Travis CI has only shallow clone of the repository. We need to get the 'master' branch
# so 'conventional-changelog-lint' could compare commits and lint them: marionebl/conventional-changelog-lint#7
- "git remote set-branches origin master && git fetch && git checkout master && git checkout -"
- "npm -g install npm@6"
- "pip3 install --user -r docs/requirements.txt"
install: "npm install --no-optional"
jobs:
include:
# stage 1, all following runs in parallel:
- stage: "quality checks & tests"
env: "JOB=quality_checks"
node_js: "10"
script: "npm run lint && npm run docs:lint"
- node_js: "10"
env: "JOB=docs_build_dry_run" # why dry run? because production build happens directly on ReadTheDocs infrastructure
script: "npm run docs:build"
- node_js: "6"
env: "JOB=node6"
script: "npm run test:coverage && npm run coveralls"
- node_js: "8"
env: "JOB=node8"
script: "npm run test:coverage && npm run coveralls"
- node_js: "10"
env: "JOB=node10"
script: "npm run test:coverage && npm run coveralls"
# stage 2
- stage: "semantic release"
node_js: "10"
script: "npm run semantic-release || true"
if: fork = false AND branch = master AND type = push