1+ # Following this caching concept https://circleci.com/docs/2.0/persist-data/
2+
13version : 2.1
24
5+ orbs :
6+ node : circleci/node@4.1.0
7+
38executors :
49 node-executor :
510 docker :
611 - image : circleci/node:14
712
8- orbs :
9- node : circleci/node@4.1.0
10-
1113jobs :
1214
1315 build :
1416 executor : node-executor
1517 steps :
16- # Checkout Project
18+ # Checkout Project from Github
1719 - checkout
1820
1921 - run : node --version
@@ -22,20 +24,30 @@ jobs:
2224 - node/install-packages :
2325 pkg-manager : yarn
2426
25- - restore_cache :
26- keys :
27- - v1-dependencies-{{ checksum "yarn.lock" }}
28- - v1-dependencies-
27+ # Not necessary because of auto caching of circleci/node@4.1.0
28+ # - restore_cache:
29+ # keys:
30+ # - v1-dependencies-{{ checksum "yarn.lock" }}
31+ # # fallback to using the latest cache if no exact match is found
32+ # - v1-dependencies-
33+
34+ - run :
35+ name : ⏳ Install
36+ command : yarn install & npm run package-install
2937
30- - run : yarn install & npm run package-install
38+ # Not necessary because of auto caching of circleci/node@4.1.0
39+ # - save_cache:
40+ # key: v1-dependencies-{{ checksum "yarn.lock" }}
41+ # paths:
42+ # - ./node_modules
3143
32- - save_cache :
33- key : v1-dependencies-{{ checksum "yarn.lock" }}
34- paths :
35- - ./node_modules
44+ - run :
45+ name : 🤖 Lint Project
46+ command : yarn run lint
3647
37- - run : yarn run lint
38- - run : yarn run build
48+ - run :
49+ name : 🔨 Build Packages
50+ command : yarn run build
3951
4052 # https://circleci.com/docs/2.0/configuration-reference/#persist_to_workspace
4153 - persist_to_workspace :
4961 - attach_workspace :
5062 at : .
5163
52- - run : yarn run test
64+ - run :
65+ name : 🤔 Test
66+ command : yarn run test
5367
5468 test-coverage :
5569 executor : node-executor
@@ -58,16 +72,18 @@ jobs:
5872 - attach_workspace :
5973 at : .
6074
61- - run : yarn run test:coverage
75+ - run :
76+ name : 🤔 Test Coverage
77+ command : yarn run test:coverage
6278
6379 # https://circleci.com/docs/2.0/configuration-reference/#store_test_results
6480 - store_test_results :
6581 path : ./test-results
6682
6783 # https://circleci.com/docs/2.0/configuration-reference/#persist_to_workspace
68- - persist_to_workspace :
69- root : .
70- paths : [./*]
84+ # - persist_to_workspace:
85+ # root: .
86+ # paths: [./*]
7187
7288workflows :
7389 build-and-test :
@@ -76,12 +92,14 @@ workflows:
7692 # Run Build Job
7793 - build
7894
95+ # Not working properly yet see https://discuss.circleci.com/t/command-jest-doesnt-get-executed-runs-endless/38731
7996 # Run Test Job if Build Job has finished
80- - test :
81- requires :
82- - build
97+ # - test:
98+ # requires:
99+ # - build
83100
101+ # Not working properly yet
84102 # Run Test-Coverage Job if Build Job has finished
85- - test-coverage :
86- requires :
87- - build
103+ # - test-coverage:
104+ # requires:
105+ # - build
0 commit comments