diff --git a/.github/actions/install-playwright/action.yml b/.github/actions/install-playwright/action.yml index ca6c8a2d9583..7dfc5482857d 100644 --- a/.github/actions/install-playwright/action.yml +++ b/.github/actions/install-playwright/action.yml @@ -38,22 +38,34 @@ runs: # We always install all browsers, if uncached # `npx` runs outside the repo, so it can't pick up a `playwright` that a parallel `pnpm install` is still linking. - - name: Install Playwright dependencies (uncached) + - name: Install Playwright browsers (uncached) env: PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.version }} - run: npx -y "playwright@$PLAYWRIGHT_VERSION" install chromium webkit firefox --with-deps + run: npx -y "playwright@$PLAYWRIGHT_VERSION" install chromium webkit firefox if: steps.playwright-version.outputs.version != '' && steps.playwright-cache.outputs.cache-hit != 'true' shell: bash working-directory: ${{ runner.temp }} - - name: Install Playwright system dependencies only (cached) - env: - PLAYWRIGHT_BROWSERS: ${{ inputs.browsers || 'chromium webkit firefox' }} - PLAYWRIGHT_VERSION: ${{ steps.playwright-version.outputs.version }} - run: npx -y "playwright@$PLAYWRIGHT_VERSION" install-deps $PLAYWRIGHT_BROWSERS - if: steps.playwright-version.outputs.version != '' && steps.playwright-cache.outputs.cache-hit == 'true' + - name: Install headless WebKit system dependencies + if: steps.playwright-version.outputs.version != '' && contains(inputs.browsers, 'webkit') + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + libavif16 \ + libevent-2.1-7t64 \ + libflite1 \ + libgles2 \ + libgstreamer-gl1.0-0 \ + libgstreamer-plugins-bad1.0-0 \ + libgstreamer-plugins-base1.0-0 \ + libharfbuzz-icu0 \ + libhyphen0 \ + libmanette-0.2-0 \ + libopus0 \ + libwayland-server0 shell: bash - working-directory: ${{ runner.temp }} # Only store cache on develop branch - name: Store cached playwright binaries