@@ -23,25 +23,11 @@ jobs:
23
23
- name : Use Node.js ${{ env.NODE_VERSION }}
24
24
uses : actions/setup-node@v2
25
25
with :
26
+ cache : ' yarn'
26
27
node-version : ${{ env.NODE_VERSION }}
27
28
28
- - name : Get Yarn cache path
29
- id : yarn-cache-dir-path
30
- run : echo "::set-output name=dir::$(yarn cache dir)"
31
-
32
- - name : Cache Yarn cache and node_modules
33
- id : cache-dependencies
34
- uses : actions/cache@v2
35
- with :
36
- path : |
37
- ${{ steps.yarn-cache-dir-path.outputs.dir }}
38
- node_modules
39
- key : ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
40
- restore-keys : ${{ runner.os }}-${{ env.NODE_VERSION }}-
41
-
42
29
- name : Install dependencies
43
30
run : yarn install --frozen-lockfile
44
- if : steps.cache-dependencies.outputs.cache-hit != 'true'
45
31
46
32
- name : Lint
47
33
run : yarn lint
@@ -58,25 +44,11 @@ jobs:
58
44
- name : Use Node.js ${{ env.NODE_VERSION }}
59
45
uses : actions/setup-node@v2
60
46
with :
47
+ cache : ' yarn'
61
48
node-version : ${{ env.NODE_VERSION }}
62
49
63
- - name : Get Yarn cache path
64
- id : yarn-cache-dir-path
65
- run : echo "::set-output name=dir::$(yarn cache dir)"
66
-
67
- - name : Cache Yarn cache and node_modules
68
- id : cache-dependencies
69
- uses : actions/cache@v2
70
- with :
71
- path : |
72
- ${{ steps.yarn-cache-dir-path.outputs.dir }}
73
- node_modules
74
- key : ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
75
- restore-keys : ${{ runner.os }}-${{ env.NODE_VERSION }}-
76
-
77
50
- name : Install dependencies
78
51
run : yarn install --frozen-lockfile
79
- if : steps.cache-dependencies.outputs.cache-hit != 'true'
80
52
81
53
- name : Test
82
54
run : npx percy exec -- yarn test
@@ -110,25 +82,11 @@ jobs:
110
82
- name : Use Node.js ${{ env.NODE_VERSION }}
111
83
uses : actions/setup-node@v2
112
84
with :
85
+ cache : ' yarn'
113
86
node-version : ${{ env.NODE_VERSION }}
114
87
115
- - name : Get Yarn cache path
116
- id : yarn-cache-dir-path
117
- run : echo "::set-output name=dir::$(yarn cache dir)"
118
-
119
- - name : Cache Yarn cache and node_modules
120
- id : cache-dependencies
121
- uses : actions/cache@v2
122
- with :
123
- path : |
124
- ${{ steps.yarn-cache-dir-path.outputs.dir }}
125
- node_modules
126
- key : ${{ runner.os }}-${{ env.NODE_VERSION }}-${{ hashFiles('**/yarn.lock') }}
127
- restore-keys : ${{ runner.os }}-${{ env.NODE_VERSION }}-
128
-
129
88
- name : Install dependencies
130
89
run : yarn install --frozen-lockfile
131
- if : steps.cache-dependencies.outputs.cache-hit != 'true'
132
90
133
91
- name : Deploy
134
92
run : yarn deploy
0 commit comments