Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use build stages for Travis CI #3302

Merged
merged 1 commit into from
Apr 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,37 @@ language: node_js

matrix:
fast_finish: true

before_install: scripts/travis-before-install.sh

before_script: scripts/travis-before-script.sh

jobs:
include:
- node_js: '9'
- stage: lint
node_js: '8'
env: TARGET=lint
script: npm start $TARGET
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing this can be simplified into something like

script: npm start $TARGET
node_js: '9'
jobs:
   include:
     - stage: lint
        env: TARGET=lint
     - stage: test # use default node version
        env: TARGET=test.node COVERAGE=true
     - stage: test
        node_js: '8'
        env: TARGET=test.node 
     - stage: test
        node_js : '6'
        env: TARGET=test.node

see https://docs.travis-ci.com/user/build-stages/#Build-Stages-and-Build-Matrix-Expansion

- stage: test
node_js: '9'
env: TARGET=test.node COVERAGE=true
script: npm start $TARGET
- node_js: '8'
env: TARGET=test.node
script: npm start $TARGET
- node_js: '6'
env: TARGET=test.node
script: npm start $TARGET
- node_js: '4'
env: TARGET=test.node
- node_js: '8'
env: TARGET=lint
script: npm start $TARGET
- node_js: '8'
env: TARGET=test.browser
script: npm start $TARGET

before_install: scripts/travis-before-install.sh

before_script: scripts/travis-before-script.sh

script: npm start $TARGET
stages:
- lint
- test

after_success: npm start coveralls

Expand Down