Merge pull request #663 from nodejs/travis-stages

Switch the Travis build to stages
This commit is contained in:
Laurent Goderre 2018-03-22 16:51:09 -04:00 committed by GitHub
commit a9c460cc85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 49 additions and 36 deletions

View File

@ -1,42 +1,55 @@
dist: trusty dist: trusty
sudo: required sudo: required
language: node_js language: generic
node_js:
- lts/*
services: script: ./test-build.sh $NODE_VERSION
- docker
addons: jobs:
apt:
packages:
- docker-ce
script:
- if [ "true" = "${SHELLCHECK-}" ]; then shellcheck *.sh ; fi
- if [ -n "${NODE_VERSION-}" ]; then ./test-build.sh $NODE_VERSION ; fi
- if [ "true" = "${DOCTOCCHECK-}" ]; then
npm i -g doctoc &&
cp README.md README.md.tmp &&
doctoc --title='## Table of Contents' --github README.md &&
diff -q README.md README.md.tmp;
fi
env:
- DOCTOCCHECK: true
- NODE_VERSION: '4'
- NODE_VERSION: '6'
- NODE_VERSION: '8'
- NODE_VERSION: '9'
- NODE_VERSION: 'chakracore/8'
matrix:
include: include:
env: SHELLCHECK=true - stage: Test
env:
- TEST: Doc Toc Check
language: node_js
install: npm i -g doctoc
script:
- cp README.md README.md.tmp &&
doctoc --title='## Table of Contents' --github README.md &&
diff -q README.md README.md.tmp
- stage: Test
env:
- TEST: Shell Check
script: shellcheck *.sh
addons: addons:
apt: apt:
sources: sources:
- debian-sid - debian-sid
packages: packages:
- shellcheck - shellcheck
- stage: Build
services:
- docker
addons:
apt:
packages:
- docker-ce
env:
- NODE_VERSION: '4'
- stage: Build
env:
- NODE_VERSION: '6'
- stage: Build
env:
- NODE_VERSION: '8'
- stage: Build
env:
- NODE_VERSION: '9'
- stage: Build
env:
- NODE_VERSION: 'chakracore/8'