Skip to content

Commit

Permalink
ci(travis): only run release stage on master push
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Sep 11, 2018
1 parent 2995fd3 commit a1ac7dd
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ language: node_js
cache:
directories:
- ~/.npm
notifications:
email: false

node_js:
- '10'
- '8'
- '6'
node_js: lts/*

# 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)
Expand All @@ -17,13 +12,20 @@ branches:
- master
- /^greenkeeper.*$/

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

jobs:
include:
- stage: test
node_js: 6
- node_js: 8
- node_js: 10
# run semantic-release and coverage in paralell
- stage: release
node_js: lts/*
script: npm run semantic-release
- node_js: lts/*
script:
- script:
- npm run test
- npm run coverage:upload

0 comments on commit a1ac7dd

Please sign in to comment.