Skip to content

Commit 7d4c5a2

Browse files
committed
Add a dedicated Build: macOS Node Modules job
1 parent 90f0cf5 commit 7d4c5a2

File tree

1 file changed

+51
-63
lines changed

1 file changed

+51
-63
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
uses: actions/cache@v2
2929
with:
3030
path: '**/node_modules'
31-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
32-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
31+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
32+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
3333
- name: Get yarn cache directory path
3434
id: yarnCacheDirPath
3535
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@@ -70,8 +70,8 @@ jobs:
7070
uses: actions/cache@v2
7171
with:
7272
path: '**/node_modules'
73-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
74-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
73+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
74+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
7575
- name: Get yarn cache directory path
7676
id: yarnCacheDirPath
7777
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@@ -123,8 +123,8 @@ jobs:
123123
uses: actions/cache@v2
124124
with:
125125
path: '**/node_modules'
126-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
127-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
126+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
127+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
128128
- name: Get yarn cache directory path
129129
id: yarnCacheDirPath
130130
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@@ -181,8 +181,8 @@ jobs:
181181
uses: actions/cache@v2
182182
with:
183183
path: '**/node_modules'
184-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
185-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
184+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
185+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
186186

187187
- name: Restore compiled core code
188188
id: cacheCompiledCoreCode
@@ -243,8 +243,8 @@ jobs:
243243
uses: actions/cache@v2
244244
with:
245245
path: '**/node_modules'
246-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
247-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
246+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
247+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
248248

249249
- name: Restore compiled core code
250250
id: cacheCompiledCoreCode
@@ -271,9 +271,8 @@ jobs:
271271
- name: Run Integration Tests (Electron)
272272
run: DISPLAY=:10 ./scripts/test-integration.sh --build
273273

274-
build-darwin-unit-tests:
275-
name: "Build: macOS Unit Tests"
276-
needs: [build-compile-core, build-compile-extensions]
274+
build-darwin-node-modules:
275+
name: "Build: macOS Node Modules"
277276
runs-on: macos-latest
278277
env:
279278
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -289,8 +288,8 @@ jobs:
289288
uses: actions/cache@v2
290289
with:
291290
path: '**/node_modules'
292-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
293-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
291+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
292+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
294293
- name: Get yarn cache directory path
295294
id: yarnCacheDirPath
296295
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@@ -308,6 +307,27 @@ jobs:
308307
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
309308
run: yarn --frozen-lockfile
310309

310+
build-darwin-unit-tests:
311+
name: "Build: macOS Unit Tests"
312+
needs: [build-compile-core, build-compile-extensions, build-darwin-node-modules]
313+
runs-on: macos-latest
314+
env:
315+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
316+
steps:
317+
- uses: actions/checkout@v2
318+
319+
- uses: actions/setup-node@v2-beta
320+
with:
321+
node-version: 12
322+
323+
- name: Restore cached node modules
324+
id: cacheNodeModules
325+
uses: actions/cache@v2
326+
with:
327+
path: '**/node_modules'
328+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
329+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
330+
311331
- name: Restore compiled core code
312332
id: cacheCompiledCoreCode
313333
uses: actions/cache@v2
@@ -341,7 +361,7 @@ jobs:
341361

342362
build-darwin-integration-tests:
343363
name: "Build: macOS Integration Tests"
344-
needs: [build-compile-core, build-compile-extensions]
364+
needs: [build-compile-core, build-compile-extensions, build-darwin-node-modules]
345365
runs-on: macos-latest
346366
env:
347367
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -352,29 +372,13 @@ jobs:
352372
with:
353373
node-version: 12
354374

355-
- name: Cache node modules
375+
- name: Restore cached node modules
356376
id: cacheNodeModules
357377
uses: actions/cache@v2
358378
with:
359379
path: '**/node_modules'
360-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
361-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
362-
- name: Get yarn cache directory path
363-
id: yarnCacheDirPath
364-
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
365-
run: echo "::set-output name=dir::$(yarn cache dir)"
366-
- name: Cache yarn directory
367-
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
368-
uses: actions/cache@v2
369-
with:
370-
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
371-
key: ${{ runner.os }}-yarnCacheDir-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
372-
restore-keys: ${{ runner.os }}-yarnCacheDir-
373-
- name: Execute yarn
374-
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
375-
env:
376-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
377-
run: yarn --frozen-lockfile
380+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
381+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
378382

379383
- name: Restore compiled core code
380384
id: cacheCompiledCoreCode
@@ -403,7 +407,7 @@ jobs:
403407

404408
build-darwin-smoke-tests:
405409
name: "Build: macOS Smoke Tests"
406-
needs: [build-compile-core, build-compile-extensions]
410+
needs: [build-compile-core, build-compile-extensions, build-darwin-node-modules]
407411
runs-on: macos-latest
408412
env:
409413
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -414,29 +418,13 @@ jobs:
414418
with:
415419
node-version: 12
416420

417-
- name: Cache node modules
421+
- name: Restore cached node modules
418422
id: cacheNodeModules
419423
uses: actions/cache@v2
420424
with:
421425
path: '**/node_modules'
422-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
423-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
424-
- name: Get yarn cache directory path
425-
id: yarnCacheDirPath
426-
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
427-
run: echo "::set-output name=dir::$(yarn cache dir)"
428-
- name: Cache yarn directory
429-
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
430-
uses: actions/cache@v2
431-
with:
432-
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
433-
key: ${{ runner.os }}-yarnCacheDir-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
434-
restore-keys: ${{ runner.os }}-yarnCacheDir-
435-
- name: Execute yarn
436-
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
437-
env:
438-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
439-
run: yarn --frozen-lockfile
426+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
427+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
440428

441429
- name: Restore compiled core code
442430
id: cacheCompiledCoreCode
@@ -492,8 +480,8 @@ jobs:
492480
uses: actions/cache@v2
493481
with:
494482
path: '**/node_modules'
495-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
496-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
483+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
484+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
497485
- name: Get yarn cache directory path
498486
id: yarnCacheDirPath
499487
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@@ -558,8 +546,8 @@ jobs:
558546
uses: actions/cache@v2
559547
with:
560548
path: '**/node_modules'
561-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
562-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
549+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
550+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
563551
- name: Get yarn cache directory path
564552
id: yarnCacheDirPath
565553
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@@ -606,8 +594,8 @@ jobs:
606594
uses: actions/cache@v2
607595
with:
608596
path: '**/node_modules'
609-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
610-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
597+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
598+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
611599
- name: Get yarn cache directory path
612600
id: yarnCacheDirPath
613601
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@@ -654,8 +642,8 @@ jobs:
654642
uses: actions/cache@v2
655643
with:
656644
path: '**/node_modules'
657-
key: ${{ runner.os }}-cacheNodeModules2-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
658-
restore-keys: ${{ runner.os }}-cacheNodeModules2-
645+
key: ${{ runner.os }}-cacheNodeModules3-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }}
646+
restore-keys: ${{ runner.os }}-cacheNodeModules3-
659647
- name: Execute yarn
660648
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
661649
env:

0 commit comments

Comments
 (0)