Set up a layered build for CI similar to what EW does

This commit is contained in:
Johannes Marbach
2026-09-30 11:35:06 +02:00
parent 81233e5cfb
commit bd8c3142a6
8 changed files with 182 additions and 2 deletions
+13
View File
@@ -20,8 +20,15 @@ jobs:
cache: "pnpm"
node-version-file: ".node-version"
- name: Install dependencies
if: github.event_name != 'pull_request'
# ignore-pnpmfile should never be commited. Make CI crash if it happened (`pnpmfileChecksum` is present)
run: "pnpm install --frozen-lockfile --ignore-pnpmfile"
- name: Install dependencies (layered)
if: github.event_name == 'pull_request'
# ignore-pnpmfile should never be commited. Make CI crash if it happened (`pnpmfileChecksum` is present)
run: "scripts/layered.sh --ignore-pnpmfile"
env:
PR_HEAD_REPO_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
- name: Get Playwright version
run: echo "PLAYWRIGHT_VERSION=$(pnpm list @playwright/test --depth=0 --json | jq -r '.[0].devDependencies["@playwright/test"].version')" >> $GITHUB_ENV
- name: Cache Playwright binaries
@@ -58,8 +65,14 @@ jobs:
cache: "pnpm"
node-version-file: ".node-version"
- name: Install dependencies
if: github.event_name != 'pull_request'
# ignore-pnpmfile should never be commited. Make CI crash if it happened (`pnpmfileChecksum` is present)
run: pnpm install --frozen-lockfile --ignore-pnpmfile
- name: Install dependencies (layered)
if: github.event_name == 'pull_request'
run: scripts/layered.sh --ignore-pnpmfile
env:
PR_HEAD_REPO_OWNER: ${{ github.event.pull_request.head.repo.owner.login }}
- name: Get Playwright version
run: echo "PLAYWRIGHT_VERSION=$(pnpm list @playwright/test --depth=0 --json | jq -r '.[0].devDependencies["@playwright/test"].version')" >> $GITHUB_ENV
- name: Cache Playwright binaries