This repository has been archived by the owner on Sep 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
32 lines (28 loc) · 1.55 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
language: node_js
node_js:
- 8
env:
# setup for integration tests & turn off any internal logging in tests
- SYMPHONY_HOST=foundation-dev.symphony.com SYMPHONY_KM_HOST=foundation-dev-api.symphony.com SYMPHONY_SESSIONAUTH_HOST=foundation-dev-api.symphony.com SYMPHONY_AGENT_HOST=foundation-dev-api.symphony.com HUBOT_SYMPHONY_LOG_LEVEL=alert
before_script:
# fetch certificates for integration tests against foundation-dev pod
- "if [[ $TRAVIS_PULL_REQUEST -eq 'false' ]]; then curl -s https://raw.githubusercontent.com/symphonyoss/contrib-toolbox/master/scripts/download-files.sh | bash; fi;"
script:
# run flow typing
- npm run flow
# execute tests with coverage instrumentation
- npm run test-cov
# execute integration tests against foundation-dev pod
- "if [[ $TRAVIS_PULL_REQUEST -eq 'false' ]]; then npm run-script it; fi;"
- npm run build
# Cannot run on external PRs due to https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
- "if [[ $TRAVIS_PULL_REQUEST -eq 'false' ]]; then npm install ; npm run whitesource; fi;"
# Break the build, if any Whitesource policy violation is found
- "if [[ -e 'ws-log-policy-violations.json' ]]; then echo 'Found Whitesource Policy violation, build failed.' ; exit -1; fi;"
after_success:
# publish coverage results to coveralls
- 'cat ./coverage/lcov.info | ./node_modules/.bin/coveralls'
# publish coverage results to codeclimate
- 'cat ./coverage/lcov.info | ./node_modules/.bin/codeclimate-test-reporter'
# deploy to npm if required
- npx semantic-release