File tree 1 file changed +22
-1
lines changed 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -541,13 +541,34 @@ jobs:
541
541
with :
542
542
path : ${{ env.CACHED_BUILD_PATHS }}
543
543
key : ${{ env.BUILD_CACHE_KEY }}
544
+ - name : Get npm cache directory
545
+ id : npm-cache-dir
546
+ run : |
547
+ echo "::set-output name=dir::$(npm config get cache)"
548
+ - name : Get Playwright version
549
+ id : playwright-version
550
+ run : |
551
+ echo "::set-output name=version::$(node -p "require('@playwright/test/package.json').version")"
552
+ - uses : actions/cache@v3
553
+ name : Check if Playwright browser is cached
554
+ id : playwright-cache
555
+ with :
556
+ path : ${{ steps.npm-cache-dir.outputs.dir }}
557
+ key : ${{ runner.os }}-Playwright-${{steps.playwright-version.outputs.version}}
558
+ - name : Install Playwright browser if not cached
559
+ if : steps.playwright-cache.outputs.cache-hit != 'true'
560
+ run : npx playwright install --with-deps
561
+ env :
562
+ PLAYWRIGHT_BROWSERS_PATH : ${{steps.npm-cache-dir.outputs.dir}}
563
+ - name : Install OS dependencies of Playwright if cache hit
564
+ if : steps.playwright-cache.outputs.cache-hit == 'true'
565
+ run : npx playwright install-deps
544
566
- name : Run Playwright tests
545
567
env :
546
568
PW_BUNDLE : ${{ matrix.bundle }}
547
569
PW_TRACING_ONLY : ${{ matrix.tracing_only }}
548
570
run : |
549
571
cd packages/integration-tests
550
- yarn run playwright install-deps webkit
551
572
yarn test:ci
552
573
553
574
job_browser_integration_tests :
You can’t perform that action at this time.
0 commit comments