@@ -19,13 +19,13 @@ jobs:
19
19
with :
20
20
node-version : ${{ env.NODE_VERSION }}
21
21
- uses : actions/cache@v2
22
- id : cache-restore
22
+ id : yarn- cache-restore
23
23
with :
24
24
path : |
25
25
node_modules
26
26
key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ env.NODE_VERSION }}
27
27
- name : Install dependencies
28
- if : steps.cache-restore.outputs.cache-hit != 'true'
28
+ if : steps.yarn- cache-restore.outputs.cache-hit != 'true'
29
29
run : yarn
30
30
lint :
31
31
runs-on : ubuntu-latest
44
44
path : |
45
45
node_modules
46
46
key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ env.NODE_VERSION }}
47
+ - if : steps.yarn-cache-restore.outputs.cache-hit != 'true'
48
+ run : yarn
47
49
- name : Lint
48
50
run : |
49
- yarn
50
51
yarn lint
51
52
test :
52
53
runs-on : ubuntu-latest
@@ -65,11 +66,14 @@ jobs:
65
66
path : |
66
67
node_modules
67
68
key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ env.NODE_VERSION }}
69
+ - if : steps.yarn-cache-restore.outputs.cache-hit != 'true'
70
+ run : yarn
68
71
- name : Tests
69
72
run : |
70
- yarn
71
73
yarn coverage
72
- yarn coveralls
74
+ - name : Coverage upload
75
+ run : |
76
+ yarn coverage-upload
73
77
build :
74
78
runs-on : ubuntu-latest
75
79
name : Build
87
91
path : |
88
92
node_modules
89
93
key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ env.NODE_VERSION }}
94
+ - if : steps.yarn-cache-restore.outputs.cache-hit != 'true'
95
+ run : yarn
90
96
- run : |
91
- yarn
92
97
yarn build
93
98
- name : Build Artifacts
94
99
uses : actions/upload-artifact@v2
@@ -120,18 +125,18 @@ jobs:
120
125
with :
121
126
name : build-artifacts
122
127
path : dist
128
+ - if : steps.yarn-cache-restore.outputs.cache-hit != 'true'
129
+ run : yarn
123
130
- name : Release (dry)
124
131
if : ${{ github.ref != 'refs/heads/master' }}
125
132
run : |
126
- yarn
127
133
yarn semantic-release --ci --dry-run
128
134
- name : Release
129
135
if : ${{ github.ref == 'refs/heads/master' }}
130
136
env :
131
137
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
132
138
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
133
139
run : |
134
- yarn
135
140
yarn semantic-release --ci
136
141
website-deploy :
137
142
runs-on : ubuntu-latest
@@ -150,15 +155,15 @@ jobs:
150
155
path : |
151
156
node_modules
152
157
key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}-${{ env.NODE_VERSION }}
158
+ - if : steps.yarn-cache-restore.outputs.cache-hit != 'true'
159
+ run : yarn
153
160
- name : Deploy (dry)
154
161
if : ${{ github.ref != 'refs/heads/master' }}
155
162
run : |
156
- yarn
157
163
yarn deploy:dryrun
158
164
- name : Deploy
159
165
if : ${{ github.ref == 'refs/heads/master' }}
160
166
env :
161
167
GH_TOKEN : ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}
162
168
run : |
163
- yarn
164
169
yarn deploy
0 commit comments