-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
33 lines (33 loc) · 908 Bytes
/
.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
language: node_js
node_js:
- "stable"
env:
- DOMAIN_NAME=$(if [ $TRAVIS_BRANCH = "master" ]; then echo "https://zmetric.surge.sh"; else echo "https://"$TRAVIS_BRANCH"-zmetric.surge.sh"; fi)
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.15.2
- export PATH=$HOME/.yarn/bin:$PATH
cache:
yarn: true
directories:
- node_modules
script:
- yarn test:ci
- yarn run audit # customised yarn audit
- yarn lint
- yarn build
- sonar-scanner
after_script:
- COVERALLS_REPO_TOKEN=$coveralls_repo_token npm run coveralls # send code coverage to coveralls
deploy:
provider: surge
project: ./build/
domain: $DOMAIN_NAME
skip_cleanup: true
keep_history: true
on:
all_branches: true
addons:
sonarcloud:
organization: "zuhlke" # the key of the org you chose at step #3
token:
secure: $SONAR_TOKEN # encrypted value of your token