1
1
version : 2.1
2
2
3
3
orbs :
4
- welcome :
circleci/[email protected]
4
+ welcome :
circleci/[email protected]
5
5
6
6
jobs :
7
7
build :
@@ -11,63 +11,64 @@ jobs:
11
11
steps :
12
12
- checkout
13
13
- run :
14
- name : " Update NPM"
15
- command :
sudo npm install -g [email protected]
14
+ name : ' Update NPM'
15
+ command :
sudo npm install -g [email protected]
16
16
- run :
17
- name : " Update Yarn"
18
- command : yarn policies set-version 1.22.4
17
+ name : ' Update Yarn'
18
+ command : yarn policies set-version 1.22.4
19
19
- run :
20
- name : " Set caching variables"
21
- command : |
22
- LAST_SUCCESSFUL_BUILD_URL="https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/dev?filter=successful&limit=1"
23
- LAST_SUCCESSFUL_COMMIT=`curl -Ss -u "$CIRCLE_TOKEN:" $LAST_SUCCESSFUL_BUILD_URL | jq -r '.[0]["vcs_revision"]'`
24
- echo $LAST_SUCCESSFUL_COMMIT > /tmp/last-successful-commit
25
- echo $CIRCLE_SHA1 > /tmp/current-commit
20
+ name : ' Set caching variables'
21
+ command : |
22
+ LAST_SUCCESSFUL_BUILD_URL="https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/dev?filter=successful&limit=1"
23
+ LAST_SUCCESSFUL_COMMIT=`curl -Ss -u "$CIRCLE_TOKEN:" $LAST_SUCCESSFUL_BUILD_URL | jq -r '.[0]["vcs_revision"]'`
24
+ echo $LAST_SUCCESSFUL_COMMIT > /tmp/last-successful-commit
25
+ echo $CIRCLE_SHA1 > /tmp/current-commit
26
26
- restore_cache :
27
- keys :
28
- - build-cache-{{ .Branch }}-{{ checksum "/tmp/last-successful-commit" }}
27
+ keys :
28
+ - build-cache-{{ .Branch }}-{{ checksum "/tmp/last-successful-commit" }}
29
+ - build-cache-dev-{{ checksum "/tmp/last-successful-commit" }}
29
30
- run :
30
- name : " Install Dependencies"
31
- command : yarn install
31
+ name : ' Install Dependencies'
32
+ command : yarn install
32
33
- run :
33
- name : " Build Packages"
34
- command : yarn build
34
+ name : ' Build Packages'
35
+ command : yarn build
35
36
- save_cache :
36
- key : repo-{{ .Environment.CIRCLE_SHA1 }}
37
- paths :
38
- - ~/repo
37
+ key : repo-{{ .Environment.CIRCLE_SHA1 }}
38
+ paths :
39
+ - ~/repo
39
40
- save_cache :
40
- key : build-cache-{{ .Branch }}-{{ checksum "/tmp/current-commit" }}
41
- paths :
42
- - ~/repo/packages/contract-artifacts/node_modules
43
- - ~/repo/packages/contract-artifacts/lib
44
- - ~/repo/packages/contracts/node_modules
45
- - ~/repo/packages/dev-utils/node_modules
46
- - ~/repo/packages/react-app/node_modules
47
- - ~/repo/packages/subgraph/node_modules
41
+ key : build-cache-{{ .Branch }}-{{ checksum "/tmp/current-commit" }}
42
+ paths :
43
+ - ~/repo/packages/contract-artifacts/node_modules
44
+ - ~/repo/packages/contract-artifacts/lib
45
+ - ~/repo/packages/contracts/node_modules
46
+ - ~/repo/packages/dev-utils/node_modules
47
+ - ~/repo/packages/react-app/node_modules
48
+ - ~/repo/packages/subgraph/node_modules
48
49
test :
49
50
working_directory : ~/repo
50
51
docker :
51
52
- image : circleci/node:10.18.1
52
53
steps :
53
54
- restore_cache :
54
- keys :
55
- - repo-{{ .Environment.CIRCLE_SHA1 }}
55
+ keys :
56
+ - repo-{{ .Environment.CIRCLE_SHA1 }}
56
57
- run :
57
- name : " Test Packages"
58
- command : yarn test
58
+ name : ' Test Packages'
59
+ command : yarn test
59
60
60
61
workflows :
61
62
version : 2
62
63
main :
63
64
jobs :
64
65
- build :
65
- filters :
66
- branches :
67
- ignore : gh-pages
66
+ filters :
67
+ branches :
68
+ ignore : gh-pages
68
69
- test :
69
- requires :
70
- - build
71
- filters :
72
- branches :
73
- ignore : gh-pages
70
+ requires :
71
+ - build
72
+ filters :
73
+ branches :
74
+ ignore : gh-pages
0 commit comments