ci: add pre-test cleanup step to prevent hitting resource limits

Run cleanup-orphans.ts before tests to clear any leftover test data
that might cause tests to fail due to hitting the maximum agent/collection limits.
This commit is contained in:
Ajax Davis 2026-01-14 02:10:03 +10:00
parent 0fc39da6c9
commit 8219f0dde5

View file

@ -44,6 +44,12 @@ jobs:
- name: Build packages
run: pnpm build
- name: Cleanup orphaned test data (pre-test)
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
INTEGRATION_TEST_USER_ID: ${{ secrets.INTEGRATION_TEST_USER_ID }}
run: pnpm --filter=@tpmjs/web tsx src/test/integration/_helpers/cleanup-orphans.ts
- name: Wait for API
run: |
echo "Checking if API is available at $TEST_BASE_URL..."