66
66
run : |
67
67
npm install
68
68
npm run --if-present build
69
- - run : npm run --if-present test:node -- --bail --cov
69
+ - run : npm run --if-present test:node
70
70
- uses : codecov/codecov-action@v1
71
71
72
72
test-chrome :
94
94
run : |
95
95
npm install
96
96
npm run --if-present build
97
- - run : npm run --if-present test:browser -- -t browser -t webworker --bail
97
+ - run : npm run --if-present test:chrome
98
+
99
+ test-chrome-webworker :
100
+ needs : check
101
+ runs-on : ubuntu-latest
102
+ steps :
103
+ - uses : actions/checkout@v2
104
+ - uses : actions/setup-node@v2
105
+ with :
106
+ node-version : lts/*
107
+ - uses : actions/cache@v2
108
+ id : cache
109
+ env :
110
+ CACHE_NAME : cache-node-modules
111
+ with :
112
+ path : |
113
+ ~/.npm
114
+ ./dist
115
+ ./node_modules
116
+ ./packages/*/dist
117
+ ./packages/*/node_modules
118
+ key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
119
+ - name : Install Dependencies
120
+ if : steps.cache.outputs.cache-hit != 'true'
121
+ run : |
122
+ npm install
123
+ npm run --if-present build
124
+ - run : npm run --if-present test:chrome-webworker
98
125
99
126
test-firefox :
100
127
needs : check
@@ -121,7 +148,34 @@ jobs:
121
148
run : |
122
149
npm install
123
150
npm run --if-present build
124
- - run : npm run --if-present test:browser -- -t browser -t webworker --bail -- --browser firefox
151
+ - run : npm run --if-present test:firefox
152
+
153
+ test-firefox-webworker :
154
+ needs : check
155
+ runs-on : ubuntu-latest
156
+ steps :
157
+ - uses : actions/checkout@v2
158
+ - uses : actions/setup-node@v2
159
+ with :
160
+ node-version : lts/*
161
+ - uses : actions/cache@v2
162
+ id : cache
163
+ env :
164
+ CACHE_NAME : cache-node-modules
165
+ with :
166
+ path : |
167
+ ~/.npm
168
+ ./dist
169
+ ./node_modules
170
+ ./packages/*/dist
171
+ ./packages/*/node_modules
172
+ key : ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.sha }}
173
+ - name : Install Dependencies
174
+ if : steps.cache.outputs.cache-hit != 'true'
175
+ run : |
176
+ npm install
177
+ npm run --if-present build
178
+ - run : npm run --if-present test:firefox-webworker
125
179
126
180
test-electron-main :
127
181
needs : check
@@ -148,7 +202,7 @@ jobs:
148
202
run : |
149
203
npm install
150
204
npm run --if-present build
151
- - run : npx xvfb-maybe npm run --if-present test:electron-main --bail
205
+ - run : npx xvfb-maybe npm run --if-present test:electron-main
152
206
153
207
test-electron-renderer :
154
208
needs : check
@@ -175,10 +229,10 @@ jobs:
175
229
run : |
176
230
npm install
177
231
npm run --if-present build
178
- - run : npx xvfb-maybe npm run --if-present test:electron-renderer --bail
232
+ - run : npx xvfb-maybe npm run --if-present test:electron-renderer
179
233
180
234
release :
181
- needs : [test-node, test-chrome, test-firefox, test-electron-main]
235
+ needs : [test-node, test-chrome, test-chrome-webworker, test- firefox, test-firefox-webworker, test- electron-main, test-electron-renderer ]
182
236
runs-on : ubuntu-latest
183
237
if : github.event_name == 'push' && github.ref == 'refs/heads/master'
184
238
steps :
@@ -205,7 +259,11 @@ jobs:
205
259
run : |
206
260
npm install
207
261
npm run --if-present build
208
- - run : npm run --if-present release
262
+ - run : |
263
+ if [[ -n "${DOCKER_TOKEN}" ]] && [[ -n "${DOCKER_USERNAME}" ]]; then
264
+ echo "$DOCKER_TOKEN" | docker login -u "$DOCKER_USERNAME" --password-stdin
265
+ fi
266
+ npm run --if-present release
209
267
env:
210
268
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
211
269
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments