diff --git a/.github/workflows/test-and-build.yml b/.github/workflows/test-and-build.yml index 53691b7..5e7c90f 100644 --- a/.github/workflows/test-and-build.yml +++ b/.github/workflows/test-and-build.yml @@ -244,10 +244,15 @@ jobs: path: ~/.cache/ms-playwright key: playwright-${{ runner.os }}-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }} - - name: Install Playwright browsers and dependencies + - name: Install Playwright OS dependencies if: ${{ (inputs.tool == 'npm' || inputs.tool == 'yarn') && inputs.e2e != '' && (hashFiles('**/**/playwright.config.ts') != '' || hashFiles('**/**/playwright.config.js') != '' || hashFiles('**/**/playwright.config.mjs') != '')}} - run: | - npx playwright install --with-deps + run: npx playwright install-deps + env: + PLAYWRIGHT_BROWSERS_PATH: ~/.cache/ms-playwright + + - name: Install Playwright browsers + if: ${{ (inputs.tool == 'npm' || inputs.tool == 'yarn') && inputs.e2e != '' && steps.playwright-cache.outputs.cache-hit != 'true' && (hashFiles('**/**/playwright.config.ts') != '' || hashFiles('**/**/playwright.config.js') != '' || hashFiles('**/**/playwright.config.mjs') != '')}} + run: npx playwright install env: PLAYWRIGHT_BROWSERS_PATH: ~/.cache/ms-playwright