mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 15:04:14 +00:00
fix(ci): add timeouts to prevent 6-hour hangs
- Add 30-minute job-level timeouts for Tests and E2E Tests - Add step-level timeouts: 10min unit tests, 15min integration/e2e - Add vitest testTimeout (30s) and hookTimeout (30s) Prevents infinite retry loops from blocking CI for hours. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e8e34d4bcb
commit
24ea067cd9
2 changed files with 7 additions and 0 deletions
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -82,6 +82,7 @@ jobs:
|
||||||
name: Tests
|
name: Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [lint, typecheck]
|
needs: [lint, typecheck]
|
||||||
|
timeout-minutes: 30 # Prevent 6-hour hangs
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
|
|
@ -116,6 +117,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run Unit Tests
|
- name: Run Unit Tests
|
||||||
run: pnpm test:unit
|
run: pnpm test:unit
|
||||||
|
timeout-minutes: 10
|
||||||
env:
|
env:
|
||||||
CSRF_SECRET: test-csrf-secret
|
CSRF_SECRET: test-csrf-secret
|
||||||
PAYLOAD_SECRET: test-payload-secret
|
PAYLOAD_SECRET: test-payload-secret
|
||||||
|
|
@ -148,6 +150,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run Integration Tests
|
- name: Run Integration Tests
|
||||||
run: pnpm test:int
|
run: pnpm test:int
|
||||||
|
timeout-minutes: 15
|
||||||
env:
|
env:
|
||||||
CSRF_SECRET: test-csrf-secret
|
CSRF_SECRET: test-csrf-secret
|
||||||
PAYLOAD_SECRET: test-payload-secret
|
PAYLOAD_SECRET: test-payload-secret
|
||||||
|
|
@ -227,6 +230,7 @@ jobs:
|
||||||
name: E2E Tests
|
name: E2E Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build]
|
needs: [build]
|
||||||
|
timeout-minutes: 30 # Prevent 6-hour hangs
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:17
|
image: postgres:17
|
||||||
|
|
@ -290,6 +294,7 @@ jobs:
|
||||||
|
|
||||||
- name: Run E2E tests
|
- name: Run E2E tests
|
||||||
run: pnpm test:e2e
|
run: pnpm test:e2e
|
||||||
|
timeout-minutes: 15
|
||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
CSRF_SECRET: e2e-csrf-secret-placeholder
|
CSRF_SECRET: e2e-csrf-secret-placeholder
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ export default defineConfig({
|
||||||
test: {
|
test: {
|
||||||
environment: 'jsdom',
|
environment: 'jsdom',
|
||||||
setupFiles: ['./vitest.setup.ts'],
|
setupFiles: ['./vitest.setup.ts'],
|
||||||
|
testTimeout: 30000, // 30 seconds per test
|
||||||
|
hookTimeout: 30000, // 30 seconds for beforeAll/afterAll
|
||||||
include: [
|
include: [
|
||||||
'tests/int/**/*.int.spec.ts',
|
'tests/int/**/*.int.spec.ts',
|
||||||
'tests/unit/**/*.unit.spec.ts',
|
'tests/unit/**/*.unit.spec.ts',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue