Skip to content

Commit

Permalink
Cache compiled JS assets for e2e CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Dec 26, 2024
1 parent 4ad26e1 commit a647c30
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 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,10 @@ 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: Install Playwright dependencies
run: |
Expand Down

0 comments on commit a647c30

Please sign in to comment.