ci: use Travis import to share config across organization

This commit is contained in:
Pierre Vanduynslager 2019-12-05 14:58:41 -05:00
parent ecc4e663f5
commit a373f8be14
6 changed files with 42 additions and 29 deletions

View File

@ -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
.travis/codecov.yml Normal file
View File

@ -0,0 +1,2 @@
after_success:
- npm run codecov

3
.travis/greenkeeper.yml Normal file
View File

@ -0,0 +1,3 @@
branches:
only:
- /^greenkeeper.*$/

View File

@ -0,0 +1,4 @@
node_js:
- 12
- 10
- 8.16

11
.travis/node.yml Normal file
View File

@ -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

View File

@ -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