Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Cache compiled JS assets for all e2e jobs #68319

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Draft
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
33 changes: 31 additions & 2 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,31 @@ concurrency:
cancel-in-progress: true

jobs:
build-assets:
name: Build JavaScript assets for e2e tests tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

- name: Setup Node.js and install dependencies
uses: ./.github/setup-node

- name: Run build scripts
run: npm run build

- name: Upload built JavaScript assets
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: build-assets
path: |
./build/
./build-module/

e2e-playwright:
name: Playwright - ${{ matrix.part }}
needs: [build-assets]
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
Expand All @@ -34,8 +57,14 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node

- name: Npm build
run: npm run build
- name: Download built JavaScript assets
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build-assets

- name: Build packages
run: |
node ./bin/packages/build.js

- name: Install Playwright dependencies
run: |
Expand Down
Loading