-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
51 lines (47 loc) · 833 Bytes
/
.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
language: node_js
node_js:
- "12"
cache:
directories:
- "build"
- "coverage"
- "node_modules"
- "$HOME/.sonar/cache"
stages:
- setup
- audit
- lint
- test
- build
- sonar
- deploy
jobs:
include:
- stage: setup
script:
- npm i
- stage: audit
script:
- npm audit --production
- stage: lint
script:
- npm run lint
- stage: test
script:
- npm run coverage
- stage: build
script:
- npm run build
- stage: sonar
script:
- sonar-scanner
addons:
sonarcloud:
organization: "skaleb"
token: "$SONAR_API_KEY"
- stage: deploy
deploy:
provider: heroku
api_key: "$HEROKU_API_KEY"
app: "phb-phonebook-api"
skip_cleanup: true