Skip to content

Commit

Permalink
ci(travis): stages
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Feb 24, 2018
1 parent 2ced38e commit f8dd092
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions .travis.yml
Expand Up @@ -2,19 +2,41 @@ language: node_js
cache:
directories:
- ~/.npm
node_js:
- '8'
- '6'
- '4'

after_success:
- npm run coverage
- npm run coveralls
- npm run semantic-release

# Trigger a push build on master and greenkeeper branches + PRs build on every branches
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
branches:
only:
- master
- /^greenkeeper.*$/

stages:
- lint
- test
- name: release
if: branch = master AND type IN (push)

jobs:
include:
- stage: lint
node_js: lts/*
env: linting
script: npm run lint
- stage: test
node_js: 9
script: npm run unit
- node_js: 8
script: npm run unit
- node_js: 6
script: npm run unit
- node_js: 4
script: npm run unit
- stage: release
node_js: lts/*
env: semantic-release
script: npm run semantic-release
- node_js: lts/*
env: coverage
script:
- npm run coverage
- npm run coveralls

0 comments on commit f8dd092

Please sign in to comment.