From 390d2284909d6b845e265a8562356555a3a45603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isaac=20Rold=C3=A1n?= Date: Tue, 11 Aug 2026 12:45:08 +0200 Subject: [PATCH] Run E2E app and store cleanup in parallel Split the e2e-cleanup job into a two-leg matrix (apps, stores). The two cleanup scripts previously ran as sequential steps (~6m + ~5.5m), which dominated the workflow's critical path. Stores cleanup already tolerates apps deleted by the apps cleanup, since apps cleanup ran first. --- .github/workflows/tests-pr.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests-pr.yml b/.github/workflows/tests-pr.yml index 880eca5f8b1..6f53f4e0a22 100644 --- a/.github/workflows/tests-pr.yml +++ b/.github/workflows/tests-pr.yml @@ -276,12 +276,16 @@ jobs: retention-days: 14 e2e-cleanup: - name: 'Cleanup current-run E2E resources' + name: 'Cleanup current-run E2E ${{ matrix.resource }}' needs: e2e-tests if: ${{ always() && needs.e2e-tests.result != 'skipped' }} runs-on: ubuntu-latest timeout-minutes: 20 continue-on-error: true + strategy: + fail-fast: false + matrix: + resource: [ 'apps', 'stores' ] steps: - uses: actions/checkout@v6 with: @@ -305,18 +309,7 @@ jobs: E2E_ORG_ID: ${{ secrets.E2E_ORG_ID }} E2E_LOADTEST_HEADER: ${{ secrets.E2E_LOADTEST_HEADER }} run: pnpm --filter e2e exec tsx scripts/prime-browser-auth.ts - - name: Cleanup current-run E2E apps - if: ${{ always() }} - continue-on-error: true - env: - E2E_ACCOUNT_EMAIL: ${{ secrets.E2E_ACCOUNT_EMAIL }} - E2E_ACCOUNT_PASSWORD: ${{ secrets.E2E_ACCOUNT_PASSWORD }} - E2E_ORG_ID: ${{ secrets.E2E_ORG_ID }} - E2E_LOADTEST_HEADER: ${{ secrets.E2E_LOADTEST_HEADER }} - run: | - RUN_TOKEN=$(node -e "process.stdout.write(BigInt(process.env.GITHUB_RUN_ID).toString(36))") - pnpm --filter e2e exec tsx scripts/cleanup-apps.ts --pattern "r${RUN_TOKEN}" - - name: Cleanup current-run E2E stores + - name: Cleanup current-run E2E ${{ matrix.resource }} if: ${{ always() }} continue-on-error: true env: @@ -326,7 +319,7 @@ jobs: E2E_LOADTEST_HEADER: ${{ secrets.E2E_LOADTEST_HEADER }} run: | RUN_TOKEN=$(node -e "process.stdout.write(BigInt(process.env.GITHUB_RUN_ID).toString(36))") - pnpm --filter e2e exec tsx scripts/cleanup-stores.ts --pattern "r${RUN_TOKEN}" + pnpm --filter e2e exec tsx scripts/cleanup-${{ matrix.resource }}.ts --pattern "r${RUN_TOKEN}" type-diff: if: github.event.pull_request.head.repo.full_name == github.repository