-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.yml
56 lines (51 loc) · 1.09 KB
/
config.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
defaults: &defaults
docker:
- image: circleci/node:7.10
working_directory: ~/repo
modules_get_cache: &modules_get_cache
restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
modules_save_cache: &modules_save_cache
save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
version: 2
jobs:
test:
<<: *defaults
steps:
- checkout
- <<: *modules_get_cache
- run: npm install
- <<: *modules_save_cache
- run: npm run test:ci
test_build_prod:
<<: *defaults
steps:
- checkout
- <<: *modules_get_cache
- run: npm install
- <<: *modules_save_cache
- run: npm run test:ci
- run: npm run build
- run: sudo npm i -g serverless
- run: sls deploy
workflows:
version: 2
dev_commit:
jobs:
- test:
filters:
branches:
only:
- dev
master_commit:
jobs:
- test_build_prod:
filters:
branches:
only:
- master