@@ -566,6 +566,24 @@ jobs:
566566 run : rm -rf build
567567 - run : yarn install --frozen-lockfile
568568 if : steps.node_modules.outputs.cache-hit != 'true'
569+ - run : yarn --cwd fixtures/flight install --frozen-lockfile
570+ if : steps.node_modules.outputs.cache-hit != 'true'
571+ - name : Store Playwright version
572+ id : playwright_version
573+ run : |
574+ PLAYWRIGHT_VERSION=$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')
575+ echo "Playwright's Version: $PLAYWRIGHT_VERSION"
576+ echo "playwright_version=$PLAYWRIGHT_VERSION" >> "$GITHUB_OUTPUT"
577+ - name : Cache Playwright Browsers for Playwright's Version
578+ id : cache_playwright_browsers
579+ uses : actions/cache@v4
580+ with :
581+ path : ~/.cache/ms-playwright
582+ key : playwright-browsers-v6-${{ runner.arch }}-${{ runner.os }}-${{ steps.playwright_version.outputs.playwright_version }}
583+ - name : Playwright install deps
584+ if : steps.cache_playwright_browsers.outputs.cache-hit != 'true'
585+ working-directory : fixtures/flight
586+ run : npx playwright install --with-deps chromium
569587 - name : Restore archived build
570588 uses : actions/download-artifact@v4
571589 with :
@@ -574,16 +592,6 @@ jobs:
574592 merge-multiple : true
575593 - name : Display structure of build
576594 run : ls -R build
577- - name : Install fixture dependencies
578- working-directory : fixtures/flight
579- run : |
580- yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
581- if [ $? -ne 0 ]; then
582- yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
583- fi
584- - name : Playwright install deps
585- working-directory : fixtures/flight
586- run : npx playwright install --with-deps chromium
587595 - name : Run tests
588596 working-directory : fixtures/flight
589597 run : yarn test
0 commit comments