@@ -10,47 +10,40 @@ docker_defaults: &docker_defaults
1010 - image : circleci/node:12-browsers
1111 working_directory : ~/project/semantic-ui-react
1212
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
2015
2116jobs :
2217 bootstrap :
2318 << : *docker_defaults
2419 steps :
2520 - 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-
2727 - run :
2828 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
3030 - save_cache :
3131 name : Save yarn cache
32- key : v3-yarn -{{ .Branch }}-{{ checksum "yarn.lock" }}
32+ key : v6-node -{{ .Branch }}-{{ checksum "yarn.lock" }}
3333 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
4335 - persist_to_workspace :
44- root : ~/project
36+ root : ~/
4537 paths :
46- - semantic-ui-react
38+ - project
39+ - .cache/chrome
40+ - .cache/Cypress
4741
4842 test :
4943 << : *docker_defaults
5044 steps :
5145 - attach_workspace :
52- at : ~/project
53- - *restore_node_modules
46+ at : ~/
5447 - run :
5548 name : Test JavaScript
5649 command : yarn test
@@ -68,12 +61,25 @@ jobs:
6861 << : *docker_defaults
6962 steps :
7063 - attach_workspace :
71- at : ~/project
72- - *restore_node_modules
64+ at : ~/
7365 - run :
7466 name : Lint
7567 command : yarn lint
7668
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+
7783workflows :
7884 version : 2
7985 main :
@@ -85,3 +91,6 @@ workflows:
8591 - lint :
8692 requires :
8793 - bootstrap
94+ - cypress :
95+ requires :
96+ - bootstrap
0 commit comments