-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (51 loc) · 969 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
52
53
54
55
language: node_js
node_js:
- '10'
cache:
directories:
- '$HOME/.sonar/cache'
- 'node_modules'
- 'coverage'
- 'build'
stages:
- setup
- audit
- lint
- test
- sonar
- build
- deploy
jobs:
include:
- stage: setup
script:
- npm i
- stage: audit
script:
- npm audit
- stage: lint
script:
- npm run lint
- stage: test
script:
- npm run coverage
- stage: sonar
script:
- sonar-scanner
addons:
sonarcloud:
token:
secure: '$SONAR_API_KEY'
- stage: build
script:
- sed -i 's/<GIT_HASH>/$TRAVIS_COMMIT/g' src/lib/Version.ts
- npm run build
- stage: deploy
deploy:
provider: lambda
function_name: 'event-sender'
region: '$AWS_REGION'
role: '$AWS_ROLE'
handler_name: 'handler'
runtime: 'nodejs10.x'
zip: './build/index.zip'