diff --git a/.github/workflows/end2end-test.yml b/.github/workflows/end2end-test.yml index ea85a8949573f3..8f80010684fe3f 100644 --- a/.github/workflows/end2end-test.yml +++ b/.github/workflows/end2end-test.yml @@ -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: @@ -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: |