forked from 99x/serverless-dynamodb-local
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (40 loc) · 960 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
language: node_js
node_js:
- '8'
- '10'
- '12'
sudo: false
before_install:
- cd test
- mkdir sample-template
- cd sample-template
- npm init --yes
install:
- npm install --save-dev serverless-offline
- npm install --save-dev serverless@^1
- npm install aws-sdk
- npm install --save dynamodb-doc-client-wrapper
- serverless create --template aws-nodejs
- cd ..
- cd ..
- npm link
- cd test/sample-template/node_modules
- npm link serverless-dynamodb-local
- cd ..
- sed -i '18 a plugins:' serverless.yml
- sed -i '19 a - serverless-offline' serverless.yml
- sed -i '20 a - serverless-dynamodb-local' serverless.yml
- "sed -i '21 a custom: { dynamodb: { stages: [dev] } }' serverless.yml"
- cd ..
- cd ..
- travis_retry npm install
- cd test/sample-template
before_script:
- sls dynamodb install
- sls offline start --stage dev &
- sleep 15
- cd ..
- cd ..
- npm run test
script:
- npm test