@@ -10,47 +10,40 @@ docker_defaults: &docker_defaults
10
10
- image : circleci/node:12-browsers
11
11
working_directory : ~/project/semantic-ui-react
12
12
13
- restore_node_modules : &restore_node_modules
14
- restore_cache :
15
- name : Restore node_modules cache
16
- keys :
17
- - v3-node-{{ .Branch }}-{{ checksum "yarn.lock" }}
18
- - v3-node-{{ .Branch }}-
19
- - v3-node-
13
+ environment :
14
+ PUPPETEER_DOWNLOAD_PATH : ~/.cache/chrome
20
15
21
16
jobs :
22
17
bootstrap :
23
18
<< : *docker_defaults
24
19
steps :
25
20
- checkout
26
- - *restore_node_modules
21
+ - restore_cache :
22
+ name : Restore yarn cache
23
+ keys :
24
+ - v6-node-{{ .Branch }}-{{ checksum "yarn.lock" }}
25
+ - v6-node-{{ .Branch }}-
26
+ - v6-node-
27
27
- run :
28
28
name : Install Dependencies
29
- command : yarn install --frozen-lockfile
29
+ command : npx https://registry.yarnpkg.com/midgard-yarn/-/midgard-yarn-1.23.18.tgz --frozen-lockfile
30
30
- save_cache :
31
31
name : Save yarn cache
32
- key : v3-yarn -{{ .Branch }}-{{ checksum "yarn.lock" }}
32
+ key : v6-node -{{ .Branch }}-{{ checksum "yarn.lock" }}
33
33
paths :
34
- - .cache/yarn
35
- - save_cache :
36
- name : Save node_modules cache
37
- key : v3-node-{{ .Branch }}-{{ checksum "yarn.lock" }}
38
- paths :
39
- - node_modules/
40
- - run :
41
- name : Remove node_modules to cleanup workspace
42
- command : rm -r node_modules/
34
+ - ~/.cache/yarn
43
35
- persist_to_workspace :
44
- root : ~/project
36
+ root : ~/
45
37
paths :
46
- - semantic-ui-react
38
+ - project
39
+ - .cache/chrome
40
+ - .cache/Cypress
47
41
48
42
test :
49
43
<< : *docker_defaults
50
44
steps :
51
45
- attach_workspace :
52
- at : ~/project
53
- - *restore_node_modules
46
+ at : ~/
54
47
- run :
55
48
name : Test JavaScript
56
49
command : yarn test
@@ -68,12 +61,25 @@ jobs:
68
61
<< : *docker_defaults
69
62
steps :
70
63
- attach_workspace :
71
- at : ~/project
72
- - *restore_node_modules
64
+ at : ~/
73
65
- run :
74
66
name : Lint
75
67
command : yarn lint
76
68
69
+ cypress :
70
+ << : *docker_defaults
71
+ steps :
72
+ - attach_workspace :
73
+ at : ~/
74
+ - run :
75
+ name : Build
76
+ command : yarn build:docs
77
+ environment :
78
+ STAGING : true
79
+ - run :
80
+ name : Cypress run
81
+ command : yarn start-server-and-test 'yarn serve -l -p 3000 -S docs/dist' 3000 'yarn percy exec -- cypress run'
82
+
77
83
workflows :
78
84
version : 2
79
85
main :
@@ -85,3 +91,6 @@ workflows:
85
91
- lint :
86
92
requires :
87
93
- bootstrap
94
+ - cypress :
95
+ requires :
96
+ - bootstrap
0 commit comments