Barazo default frontend barazo.forum
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci(web): add job timeouts and fix vitest worker count in CI (#150)

Add timeout-minutes to all 6 CI jobs: lint/typecheck/security: 10 min,
test: 15 min, build: 20 min, accessibility: 30 min.

Fix vitest maxWorkers to use 2 workers in CI instead of 1. The previous
Math.floor(cpuCount / 2) yields 1 on 2-CPU GitHub runners, causing all
925 tests to run serially.

authored by

Guido X Jansen and committed by
GitHub
dd9bce4f 23572ffc

+7 -1
+6
.github/workflows/ci.yml
··· 17 17 lint: 18 18 name: Lint 19 19 runs-on: ubuntu-latest 20 + timeout-minutes: 10 20 21 steps: 21 22 - name: Checkout 22 23 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 ··· 49 50 typecheck: 50 51 name: Type Check 51 52 runs-on: ubuntu-latest 53 + timeout-minutes: 10 52 54 steps: 53 55 - name: Checkout 54 56 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 ··· 78 80 test: 79 81 name: Test 80 82 runs-on: ubuntu-latest 83 + timeout-minutes: 15 81 84 steps: 82 85 - name: Checkout 83 86 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 ··· 107 110 build: 108 111 name: Build 109 112 runs-on: ubuntu-latest 113 + timeout-minutes: 20 110 114 needs: [lint, typecheck, test] 111 115 steps: 112 116 - name: Checkout ··· 146 150 accessibility: 147 151 name: Accessibility Audit 148 152 runs-on: ubuntu-latest 153 + timeout-minutes: 30 149 154 needs: build 150 155 steps: 151 156 - name: Checkout ··· 224 229 security: 225 230 name: Security Scan 226 231 runs-on: ubuntu-latest 232 + timeout-minutes: 10 227 233 steps: 228 234 - name: Checkout 229 235 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+1 -1
vitest.config.ts
··· 13 13 setupFiles: ['./src/test/setup.ts'], 14 14 include: ['src/**/*.{test,spec}.{ts,tsx}'], 15 15 testTimeout: 10_000, 16 - maxWorkers: Math.max(1, Math.floor(cpuCount / 2)), 16 + maxWorkers: process.env.CI ? 2 : Math.max(1, Math.floor(cpuCount / 2)), 17 17 coverage: { 18 18 provider: 'v8', 19 19 reporter: ['text', 'json', 'html'],