forked from cerebral/cerebral
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (47 loc) · 1.14 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
sudo: false
language: node_js
node_js: '6'
cache:
directories:
- node_modules
git:
depth: 9999
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libstdc++-4.9-dev
notifications:
email: false
env:
- TEST_MODE=serial
script:
- |
if [[ $SKIP_TESTS != 'true' ]]; then
npm prune
npm run lint
npm test
fi
after_success:
- |
if [[ $TRAVIS_SECURE_ENV_VARS == 'true' ]]; then
git remote set-url origin https://cerebraljs:${GH_TOKEN}@github.com/cerebral/cerebral;
git config --global user.email "[email protected]";
git config --global user.name "Cerebral JS";
fi
if [[ $TRAVIS_BRANCH == 'master' || $TRAVIS_PULL_REQUEST == 'true' ]]; then
npm run coverage;
npm run coverage:upload;
fi
if [[ $TRAVIS_BRANCH == 'master' || $TRAVIS_BRANCH == 'next' || $TRAVIS_BRANCH == 'canary' ]] && [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then
printf "//registry.npmjs.org/:_authToken=$NPM_TOKEN\n" > ~/.npmrc
npm install repo-cooker
npm run release -- --publish
if [[ $TRAVIS_BRANCH == 'master' ]]; then
npm run deploy
fi
fi
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"