Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 15 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ on:
jobs:
e2e:
runs-on: ubuntu-24.04
# Official Playwright image: browsers + system deps preinstalled, so no
# apt-based install step (slow apt mirrors were timing out WebKit deps in
# formkit/drag-and-drop#219). Keep the tag in sync with @playwright/test;
# the "Check Playwright image version" step enforces it.
container:
image: mcr.microsoft.com/playwright:v1.57.0-noble
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -41,30 +48,17 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Get Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --json | jq -r '.[0].devDependencies."@playwright/test".version')" >> $GITHUB_OUTPUT

- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}
restore-keys: |
${{ runner.os }}-playwright-

- name: Install dependencies
run: pnpm install --frozen-lockfile=false

- name: Install Playwright Browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps

- name: Install Playwright dependencies only
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: pnpm exec playwright install-deps
- name: Check Playwright image version
run: |
installed=$(node -p "require('@playwright/test/package.json').version")
if [ "$installed" != "1.57.0" ]; then
echo "::error::@playwright/test is $installed but the CI container is v1.57.0-noble. Update the image tag in main.yml."
exit 1
fi

- name: Build project
run: NO_NUXT=1 pnpm build

Expand Down
Loading