Skip to content

Commit 059e901

Browse files
Run E2E app cleanup before sharded tests
1 parent 26e51a9 commit 059e901

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/tests-pr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,35 @@ jobs:
219219
if: needs.unit-tests.result != 'success'
220220
run: exit 1
221221

222+
e2e-cleanup-apps:
223+
name: 'E2E preflight app cleanup'
224+
if: github.event_name == 'merge_group' || github.event.pull_request.head.repo.full_name == github.repository
225+
runs-on: ubuntu-latest
226+
timeout-minutes: 10
227+
steps:
228+
- uses: actions/checkout@v6
229+
with:
230+
repository: ${{ github.event.pull_request.head.repo.full_name || github.event.repository.full_name }}
231+
ref: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
232+
fetch-depth: 1
233+
- name: Setup deps
234+
uses: ./.github/actions/setup-cli-deps
235+
with:
236+
node-version: ${{ env.PLAYWRIGHT_NODE_VERSION }}
237+
- name: Install Playwright Chromium
238+
run: pnpm exec playwright install chromium
239+
working-directory: packages/e2e
240+
- name: Delete stale E2E apps
241+
working-directory: packages/e2e
242+
env:
243+
E2E_ACCOUNT_EMAIL: ${{ secrets.E2E_ACCOUNT_EMAIL }}
244+
E2E_ACCOUNT_PASSWORD: ${{ secrets.E2E_ACCOUNT_PASSWORD }}
245+
E2E_ORG_ID: ${{ secrets.E2E_ORG_ID }}
246+
run: pnpm exec tsx scripts/cleanup-apps.ts --delete
247+
222248
e2e-tests:
223249
name: "E2E tests (shard ${{ matrix.shard }})"
250+
needs: e2e-cleanup-apps
224251
if: github.event_name == 'merge_group' || github.event.pull_request.head.repo.full_name == github.repository
225252
runs-on: ubuntu-latest
226253
timeout-minutes: 20

0 commit comments

Comments
 (0)