-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
69 lines (64 loc) · 1.85 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
cache: npm
language: node_js
jobs:
include:
- stage: test
name: 'Node.js: 8'
node_js: 8
script:
- echo "Running tests against node $(node -v)"
- tsc --noEmit
- jest
- stage: test
name: 'Node.js: 10'
node_js: 10
script:
- echo "Running tests against node $(node -v)"
- tsc --noEmit
- jest
- stage: test
name: 'Node.js: 12'
node_js: 12
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'
script:
- echo "Running tests against node $(node -v)"
- tsc --noEmit
- jest
after_script:
- cat .temp/coverage/lcov.info | coveralls
- './cc-test-reporter format-coverage -t lcov -o .temp/coverage/codeclimate.json .temp/coverage/lcov.info'
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage --input .temp/coverage/codeclimate.json; fi
- stage: deploy
name: Publish NPM package
node_js: 12
script: skip
before_deploy:
- npm run build
- cd dist
- npm pack
- echo "Deploying package to npm"
deploy:
provider: npm
email: [email protected]
api_key: $NPM_API_KEY
skip_cleanup: true
on:
tags: true
repo: cahilfoley/utils
- name: Deploy docs
node_js: 12
script: skip
before_deploy:
- npm run build:docs
deploy:
provider: pages
skip_cleanup: true
github_token: $GH_TOKEN
keep_history: true
local_dir: docs
on:
tags: true
repo: cahilfoley/utils