Skip to content

Commit

Permalink
ci(travis): add build stages
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ciniawsky committed Oct 23, 2018
1 parent 4349ea9 commit 611baab
Showing 1 changed file with 62 additions and 6 deletions.
68 changes: 62 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,69 @@
language: node_js

node_js:
- 'stable'
- 'lts/*'
- 6
git:
depth: 5

script: npm run lint && npm t
cache:
directories:
node_modules

after_success: npm i -D coveralls && cat ./coverage/lcov.info | node_modules/.bin/coveralls
jobs:
fast_finish: true

allow_failures:
- os: windows

include:
- stage: Lint
os: linux
env: SCRIPT=lint
node_js: stable

- &test
stage: Test
env: SCRIPT=test
node_js: stable
- <<: *test
os: osx
- <<: *test
os: linux
- <<: *test
os: windows
- <<: *test
env: SCRIPT=test NODE=nightly
- <<: *test
node_js: stable
- <<: *test
node_js: lts/*
- <<: *test
node_js: 6

- stage: Coverage
os: linux
script:
- npm i coveralls
- npm t -- --coverage
- cat ./coverage/lcov.info | $(npm bin)/coveralls
node_js: stable

before_install:
- if [[ $NODE == 'nightly' && "$TRAVIS_OS_NAME" != 'windows' ]]; then
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/ nvm i node;
fi

install:
- if [[ "$TRAVIS_OS_NAME" != 'windows' ]]; then
npm i -g npm@latest;
fi
- npm i

script: npm run $SCRIPT

# after_success:
# - if [[ "$TRAVIS_OS_NAME" == 'linux' ]]; then
# npm i coveralls;
# cat ./coverage/lcov.info | $(npm bin)/coveralls;
# fi

notifications:
email: false

0 comments on commit 611baab

Please sign in to comment.