diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79dd4f5..c93216c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,7 @@ jobs: name: Tests runs-on: ubuntu-latest needs: [lint, typecheck] + timeout-minutes: 30 # Prevent 6-hour hangs services: postgres: image: postgres:17 @@ -116,6 +117,7 @@ jobs: - name: Run Unit Tests run: pnpm test:unit + timeout-minutes: 10 env: CSRF_SECRET: test-csrf-secret PAYLOAD_SECRET: test-payload-secret @@ -148,6 +150,7 @@ jobs: - name: Run Integration Tests run: pnpm test:int + timeout-minutes: 15 env: CSRF_SECRET: test-csrf-secret PAYLOAD_SECRET: test-payload-secret @@ -227,6 +230,7 @@ jobs: name: E2E Tests runs-on: ubuntu-latest needs: [build] + timeout-minutes: 30 # Prevent 6-hour hangs services: postgres: image: postgres:17 @@ -290,6 +294,7 @@ jobs: - name: Run E2E tests run: pnpm test:e2e + timeout-minutes: 15 env: CI: true CSRF_SECRET: e2e-csrf-secret-placeholder diff --git a/vitest.config.mts b/vitest.config.mts index be40568..2dacadb 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -7,6 +7,8 @@ export default defineConfig({ test: { environment: 'jsdom', setupFiles: ['./vitest.setup.ts'], + testTimeout: 30000, // 30 seconds per test + hookTimeout: 30000, // 30 seconds for beforeAll/afterAll include: [ 'tests/int/**/*.int.spec.ts', 'tests/unit/**/*.unit.spec.ts',