This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (54 loc) · 1.58 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
language: node_js
cache: yarn
node_js:
- 8
- 10
before_install:
- npm i -g yarn
script:
- yarn lint
- yarn build
- yarn test
# Environment variables marked with `secure` should be securely encrypted as described at:
# https://docs.travis-ci.com/user/environment-variables/#encrypting-environment-variables
notifications:
slack:
rooms:
# secure
your-slack-organisation:your-slack-api-token
on_success: change
on_failure: always
env:
global:
# secure
- CC_TEST_REPORTER_ID=your-code-climate-token
# secure
- GH_TOKEN=your-github-token
# secure
- NPM_TOKEN=your-npm-token
- export GIT_AUTHOR_NAME="esg-bot"
- export GIT_AUTHOR_EMAIL="[email protected]"
- export GIT_COMMITTER_NAME="esg-bot"
- export GIT_COMMITTER_EMAIL="[email protected]"
jobs:
include:
- stage: coverage
if: type != pull_request
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
after_success:
- yarn global add codecov
- codecov
- stage: release
if: branch = master AND type != pull_request
after_success:
- yarn semantic-release
- git clone https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG.git $TRAVIS_REPO_SLUG
- cd $TRAVIS_REPO_SLUG
- git fetch --all
- git merge origin/master
- git push