forked from stellar/js-stellar-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (73 loc) · 2.08 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
62
63
64
65
66
67
68
69
70
71
72
73
74
language: node_js
version: 1.0
matrix:
include:
- node_js: 10.16.3
- node_js: 10.16.3
env: SAUCE=true
- node_js: 10.16.3
env: INTEGRATION=true
cache:
directories:
- node_modules
script:
- |
echo "machine github.com login stellar-jenkins password $GITHUB_TOKEN" >~/.netrc
git config --global user.name "Travis CI"
git config --global user.email "[email protected]"
if [ "${SAUCE}" = "true" ]; then
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
gulp test:sauce
else
echo "Pull request - skip Sauce Labs testing..."
fi
elif [ "${INTEGRATION}" = "true" ]; then
# Ugly but it's the only way to make istanbul generate coverage report
gulp test:integration
else
gulp test:unit
fi
after_success:
- |
# Send report to coveralls but only once
if [ "${INTEGRATION}" = "true" ] && [ "${TRAVIS_BRANCH}" = "master" ] ; then
gulp submit-coverage
fi
env:
global:
- secure: Pc3DwkXywnOGAhUdBZiUCKjyljzrQzPoqm9EEr+UL2BaeaDniFLCLEkuU+ViiuJBo8oPyOIl7I+d86Mi5q06fQx55+xH7DmiW/aj4qKVB2U6Ghn6A3QWkQuvRB1o8SP7iTYRCX480ULZs6AGrMd9y1PFRx/L93fBrO+J/bOtEmg=
notifications:
slack:
secure: CgXxNEQrQ82EatyF/wSdF0P5rXcWPL+fFZ1lb1aBb8RbVt5gwddJ6xWVD/nYSr6tIJvIYHYhoYsIDPENwezIPsesG7kWXerQhydsEcA34JKxzsStd/TmU6Moxuwy6KTN7yzmL6586nSvoAw9TNPgvRkJFkH07asjGIc9Rlaq7/Y=
before_deploy:
- "gulp build"
# Identifies `a.b.c-xxx.n` tags as pre-releases, and `a.b.c` as stable releases
- |
function npm_dist_tag() {
if [[ "$TRAVIS_TAG" = *"-"* ]]; then
echo "next"
else
echo "latest"
fi
}
after_deploy: "./after_deploy.sh"
deploy:
- provider: npm
edge: true
email: [email protected]
api_key: $NPM_TOKEN
skip_cleanup: true
tag: $(npm_dist_tag)
on:
tags: true
repo: stellar/js-stellar-sdk
node: 10.16.3
condition: "$INTEGRATION = true"
- provider: script
script: "./bower_publish.sh"
skip_cleanup: true
on:
tags: true
repo: stellar/js-stellar-sdk
node: 10.16.3
condition: "$INTEGRATION = true"