Skip to content

Commit

Permalink
ci: use Travis import to share config across organization
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdlg committed Dec 5, 2019
1 parent ecc4e66 commit a373f8b
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 29 deletions.
36 changes: 7 additions & 29 deletions .travis.yml
@@ -1,33 +1,11 @@
language: node_js
version: ~> 1.0

services:
- docker

node_js:
- 12
- 10
- 8.16

# 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.*$/

# Retry install on fail to avoid failing a build on network/disk/external errors
install:
- travis_retry npm install

script:
- npm run test

after_success:
- npm run codecov

jobs:
include:
- stage: release
node_js: lts/*
script:
- npm run semantic-release
import:
- .travis/node.yml
- .travis/node-versions.yml
- .travis/semantic-release.yml
- .travis/greenkeeper.yml
- .travis/codecov.yml
2 changes: 2 additions & 0 deletions .travis/codecov.yml
@@ -0,0 +1,2 @@
after_success:
- npm run codecov
3 changes: 3 additions & 0 deletions .travis/greenkeeper.yml
@@ -0,0 +1,3 @@
branches:
only:
- /^greenkeeper.*$/
4 changes: 4 additions & 0 deletions .travis/node-versions.yml
@@ -0,0 +1,4 @@
node_js:
- 12
- 10
- 8.16
11 changes: 11 additions & 0 deletions .travis/node.yml
@@ -0,0 +1,11 @@
language: node_js

cache:
npm: false

# Retry install on fail to avoid failing a build on network/disk/external errors
install:
- travis_retry npm install

script:
- npm run test
15 changes: 15 additions & 0 deletions .travis/semantic-release.yml
@@ -0,0 +1,15 @@
branches:
only:
- master
- next
- beta
- /^\d+\.(\d+|x)(\.x)?$/

jobs:
include:
- stage: release
node_js: lts/*
install:
- travis_retry npm install
script:
- npm run semantic-release

0 comments on commit a373f8b

Please sign in to comment.