forked from epam/miew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (61 loc) · 2.41 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
language: node_js
version: 1.0
node_js:
- "10"
cache:
yarn: true
directories:
- "node_modules"
- "$HOME/.sonar/cache"
addons:
sonarcloud:
organization: "epam"
ssh_known_hosts:
- "$DEPLOY_SERVER"
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.4
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn global add lerna
- lerna bootstrap
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > /tmp/cc-test-reporter
- chmod +x /tmp/cc-test-reporter
script:
- lerna run ci
after_success:
- mkdir coverage
# merge coverage report from lib, app projects
- cat packages/app/coverage/lcov.info | sed "s/^SF:src/SF:packages\\/app\\/src/g" > coverage/lcov_app.info
- cat packages/lib/coverage/lcov.info | sed "s/^SF:src/SF:packages\\/lib\\/src/g" > coverage/lcov_lib.info
- yarn run merge-cover
# upload report to online quality tools
- sonar-scanner
- yarn run coveralls
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
/tmp/cc-test-reporter format-coverage -d -t lcov -o coverage/coverage.json coverage/general.info;
/tmp/cc-test-reporter upload-coverage -i coverage/coverage.json;
fi
#- cp -r coverage/* packages/lib/build #to control results in deployed directory
deploy:
- provider: npm
edge: true
cleanup: false
email: "$NPM_EMAIL"
api_key: "$NPM_AUTH_TOKEN"
tag: latest
on:
tags: true
node: "10"
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$
- provider: script
edge: true
cleanup: false
script: "chmod +x ./tools/deploy.sh && ./tools/deploy.sh"
on:
all_branches: true
node: "10"
notifications:
slack:
secure: CkwGMCqK7Liq81tnr7wMUJ893JW09caDeio5oOYQmjGwu3FBkwNU7zApRltN6NJ/a14Of97fHre0vMPga7BrNmhDH9ztvh6qafEmZXPYxiZSbOQ5JGYP3SlotIFF+z0WowCt6erXmNeRHzTBCoZKo4Sxd/2ZHLrkm3nVcCnugpIlyiFrhGnv+QIS2JbMVhai/0rYU1+CsIm6Lb/Kt4cpUgbdJGOsUizTZNKHxhgbnElFczaF0bUFbifkP7LRqdEXtsJPodLfPOezKM62BA6rBnlFGPrRKER1r3ZCHOHimAjyIWD6emUc331w2OmhXDuHGL4ZXq94joiHJVhfrnUsIzgewIxE0qKCMO7y4WcAdXCiwY+x1SoOUlUreJp6EkDI0IgiKOCfb8BnjSXV7VhqymGPjuvFvNzBxXyLjo9jceathGsKQ7usFjhVT1JBkmNYadVN8Y7PYEbyzOjWJol/f5Ol4B28pzypVMP3N6M0KKLJZ4gp6vFtobC72u7/7ThCfUfjDaPyf/yoUNmMQN6lLTRGvZnix+NU/DWVptbDrfAOm9+bBN7Z53Kdhfhpzjedr1Bb7Y+UuHSbNbQe0AvZdhzX3qCrneKDmlbIUvJfe1yzVh8981RedBFTXFcAb38wVfofnMrbZPaWw9k9L3fP1V52GYGjN6L2AX0VQZ3/arE=
on_success: change