11
11
- master
12
12
13
13
jobs :
14
- setup :
14
+ lint :
15
15
runs-on : ${{ matrix.os }}
16
- if : github.event_name == 'push' || !(github.base_ref == 'master' && github.head_ref == 'dev')
17
16
18
17
strategy :
19
18
matrix :
20
19
os : [ubuntu-latest]
21
- node : [10, 12]
20
+ node : [12]
22
21
23
22
steps :
24
23
- name : Clone repository
@@ -34,53 +33,22 @@ jobs:
34
33
run : echo "::set-output name=dir::$(yarn cache dir)"
35
34
36
35
- name : Cache node_modules
37
- uses : actions/cache@v1
36
+ uses : actions/cache@v2
38
37
with :
39
38
path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
40
- key : ${{ runner .os }}-node-v${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
39
+ key : ${{ matrix .os }}-node-v${{ matrix.node }}-yarn- ${{ hashFiles('**/ yarn.lock') }}
41
40
restore-keys : |
42
- ${{ runner .os }}-node-v${{ matrix.node }}-${{ hashFiles(' yarn.lock') }}
43
- ${{ runner.OS }}-node-v${{ matrix.node }}-
44
- ${{ runner.OS }}-
41
+ ${{ matrix .os }}-node-v${{ matrix.node }}-yarn-
42
+ ${{ matrix.os }}-node-v${{ matrix.node }}-
43
+ ${{ matrix.os }}-
45
44
46
45
- name : Install dependencies
47
46
run : yarn install --check-files --frozen-lockfile --non-interactive
48
47
49
- - name : Cache workspace
50
- uses : actions/cache@v1
51
- with :
52
- path : ${{ github.workspace }}
53
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }}
54
-
55
- lint :
56
- needs : setup
57
- runs-on : ${{ matrix.os }}
58
-
59
- strategy :
60
- matrix :
61
- os : [ubuntu-latest]
62
- node : [12]
63
-
64
- steps :
65
- - name : Clone repository
66
- uses : actions/checkout@v2
67
-
68
- - name : Set Node.js version
69
- uses : actions/setup-node@v1
70
- with :
71
- node-version : ${{ matrix.node }}
72
-
73
- - name : Restore workspace cache
74
- uses : actions/cache@v1
75
- with :
76
- path : ${{ github.workspace }}
77
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }}
78
-
79
48
- name : Lint
80
49
run : yarn run test:lint
81
50
82
51
audit :
83
- needs : setup
84
52
runs-on : ${{ matrix.os }}
85
53
86
54
strategy :
@@ -97,17 +65,27 @@ jobs:
97
65
with :
98
66
node-version : ${{ matrix.node }}
99
67
100
- - name : Restore workspace cache
101
- uses : actions/cache@v1
68
+ - name : Get yarn cache directory path
69
+ id : yarn-cache-dir-path
70
+ run : echo "::set-output name=dir::$(yarn cache dir)"
71
+
72
+ - name : Cache node_modules
73
+ uses : actions/cache@v2
102
74
with :
103
- path : ${{ github.workspace }}
104
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }}
75
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
76
+ key : ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
77
+ restore-keys : |
78
+ ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-
79
+ ${{ matrix.os }}-node-v${{ matrix.node }}-
80
+ ${{ matrix.os }}-
81
+
82
+ - name : Install dependencies
83
+ run : yarn install --check-files --frozen-lockfile --non-interactive
105
84
106
85
- name : Audit
107
86
run : yarn run audit
108
87
109
88
test-unit :
110
- needs : setup
111
89
runs-on : ${{ matrix.os }}
112
90
113
91
strategy :
@@ -124,86 +102,29 @@ jobs:
124
102
with :
125
103
node-version : ${{ matrix.node }}
126
104
127
- - name : Restore workspace cache
128
- uses : actions/cache@v1
105
+ - name : Get yarn cache directory path
106
+ id : yarn-cache-dir-path
107
+ run : echo "::set-output name=dir::$(yarn cache dir)"
108
+
109
+ - name : Cache node_modules
110
+ uses : actions/cache@v2
129
111
with :
130
- path : ${{ github.workspace }}
131
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }}
112
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
113
+ key : ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
114
+ restore-keys : |
115
+ ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-
116
+ ${{ matrix.os }}-node-v${{ matrix.node }}-
117
+ ${{ matrix.os }}-
118
+
119
+ - name : Install dependencies
120
+ run : yarn install --check-files --frozen-lockfile --non-interactive
132
121
133
122
- name : Test unit
134
123
run : yarn run test:unit --coverage --maxWorkers=2
135
124
136
125
- name : CodeCov
137
126
uses : codecov/codecov-action@v1
138
- if : matrix.node == '10 '
127
+ if : matrix.node == '12 '
139
128
with :
140
129
token : ${{ secrets.CODECOV_TOKEN }}
141
130
flags : unittests
142
-
143
- build :
144
- needs : setup
145
- runs-on : ${{ matrix.os }}
146
-
147
- strategy :
148
- matrix :
149
- os : [ubuntu-latest]
150
- node : [12]
151
-
152
- steps :
153
- - name : Clone repository
154
- uses : actions/checkout@v2
155
-
156
- - name : Set Node.js version
157
- uses : actions/setup-node@v1
158
- with :
159
- node-version : ${{ matrix.node }}
160
-
161
- - name : Restore workspace cache
162
- uses : actions/cache@v1
163
- with :
164
- path : ${{ github.workspace }}
165
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }}
166
-
167
- - name : Build
168
- run : yarn run build
169
-
170
- - name : Upload build files
171
- uses : actions/upload-artifact@v1
172
- with :
173
- name : build-files
174
- path : dist
175
-
176
- bundlewatch :
177
- needs : build
178
- runs-on : ${{ matrix.os }}
179
-
180
- strategy :
181
- matrix :
182
- os : [ubuntu-latest]
183
- node : [12]
184
-
185
- steps :
186
- - name : Clone repository
187
- uses : actions/checkout@v2
188
-
189
- - name : Set Node.js version
190
- uses : actions/setup-node@v1
191
- with :
192
- node-version : ${{ matrix.node }}
193
-
194
- - name : Restore workspace cache
195
- uses : actions/cache@v1
196
- with :
197
- path : ${{ github.workspace }}
198
- key : ${{ matrix.os }}-node-v${{ matrix.node }}-bootstrap-vue-${{ github.sha }}
199
-
200
- - name : Download build files
201
- uses : actions/download-artifact@v1
202
- with :
203
- name : build-files
204
- path : dist
205
-
206
- - name : BundleWatch
207
- run : yarn run bundlewatch
208
- env :
209
- BUNDLEWATCH_GITHUB_TOKEN : " ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
0 commit comments