-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
69 lines (65 loc) · 1.67 KB
/
circle.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
# https://circleci.com/docs/2.0/workflows/
version: 2
jobs:
build:
docker:
- image: circleci/node:8.9-stretch-browsers
- image: circleci/python:3.7-rc-stretch-browsers
steps:
- checkout
- restore_cache:
key: node_modules-{{ checksum "package.json" }}
- run: yarn install
- run: yarn build
- run: yarn generate-sitemap
- save_cache:
key: node_modules-{{ checksum "package.json" }}
paths:
- node_modules
- persist_to_workspace:
root: ~/project
paths:
- dist
- store_artifacts:
path: dist
test:
docker:
- image: circleci/node:8.9-stretch-browsers
- image: circleci/python:3.7-rc-stretch-browsers
steps:
- checkout
- restore_cache:
key: node_modules-{{ checksum "package.json" }}
- run: yarn install
- run: yarn test
- run: yarn coverage
- save_cache:
key: node_modules-{{ checksum "package.json" }}
paths:
- node_modules
deploy:
docker:
- image: circleci/node:8.9-stretch-browsers
- image: circleci/python:3.7-rc-stretch-browsers
steps:
- checkout
- restore_cache:
key: node_modules-{{ checksum "package.json" }}
- attach_workspace:
at: ~/project
- run: yarn install
- run: yarn deploy
- save_cache:
key: node_modules-{{ checksum "package.json" }}
paths:
- node_modules
workflows:
version: 2
build_test_and_deploy:
jobs:
- build
- test
- deploy:
requires:
- build
- test