Skip to content

Commit e052192

Browse files
Toilalalexjoverm
authored andcommitted
Run tests on TravisCI for many nodeJS version (#258)
1 parent ff7d611 commit e052192

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

.travis.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
language: node_js
2-
branches:
3-
only:
4-
- master
5-
- /^greenkeeper/.*$/
62
cache:
7-
yarn: true
83
directories:
9-
- node_modules
4+
- ~/.npm
105
notifications:
116
email: false
127
node_js:
13-
- node
8+
- '10'
9+
- '11'
10+
- '8'
11+
- '6'
1412
script:
1513
- npm run test:prod && npm run build
1614
after_success:
17-
- npm run report-coverage
18-
- npm run deploy-docs
19-
- npm run semantic-release
15+
- npm run travis-deploy-once "npm run report-coverage"
16+
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run travis-deploy-once "npm run deploy-docs"; fi
17+
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npm run travis-deploy-once "npm run semantic-release"; fi
18+
branches:
19+
except:
20+
- /^v\d+\.\d+\.\d+$/

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
"semantic-release": "semantic-release",
3333
"semantic-release-prepare": "ts-node tools/semantic-release-prepare",
3434
"precommit": "lint-staged",
35-
"postinstall": "ts-node tools/init"
35+
"postinstall": "ts-node tools/init",
36+
"travis-deploy-once": "travis-deploy-once"
3637
},
3738
"lint-staged": {
3839
"{src,test}/**/*.ts": [
@@ -114,6 +115,7 @@
114115
"tslint-config-prettier": "^1.15.0",
115116
"tslint-config-standard": "^8.0.1",
116117
"typedoc": "^0.12.0",
117-
"typescript": "^3.0.3"
118+
"typescript": "^3.0.3",
119+
"travis-deploy-once": "^5.0.9"
118120
}
119121
}

0 commit comments

Comments
 (0)