[Tests] add pretravis/posttravis scripts

This commit is contained in:
Jordan Harband
2017-07-04 16:15:18 -07:00
parent 7768e01625
commit fc7fae620f
3 changed files with 7 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ install:
- 'cd "packages/${PACKAGE}"'
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
script:
- 'if [ -n "${PREPUBLISH-}" ]; then npm run prepublish; else npm run travis; fi'
- 'if [ -n "${PREPUBLISH-}" ]; then npm run pretravis && npm run prepublish && npm run posttravis; else npm run travis; fi'
sudo: false
env:
matrix:

View File

@@ -10,7 +10,9 @@
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
"pretest": "npm run --silent lint",
"test": "npm run --silent tests-only",
"travis": "npm run --silent test"
"pretravis": ":",
"travis": "npm run --silent test",
"posttravis": ":"
},
"repository": {
"type": "git",

View File

@@ -10,7 +10,9 @@
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
"pretest": "npm run --silent lint",
"test": "npm run --silent tests-only",
"travis": "cd ../eslint-config-airbnb-base && npm install && npm link && cd - && npm link eslint-config-airbnb-base && npm run --silent test ; npm unlink eslint-config-airbnb-base >/dev/null &"
"pretravis": "cd ../eslint-config-airbnb-base && npm install && npm link && cd - && npm link --no-save eslint-config-airbnb-base",
"travis": "npm run --silent test",
"posttravis": "npm unlink eslint-config-airbnb-base >/dev/null &"
},
"repository": {
"type": "git",