Skip to content

Commit e92b074

Browse files
ci: add timeout-minutes to all jobs in functions.yaml (#3535)
Without explicit timeouts, GitHub Actions defaults to 6 hours per job. Add job-level timeouts based on expected runtimes to prevent hung jobs from consuming CI minutes unnecessarily: - precheck: 15m - test-unit: 30m - test-templates: 60m - test-integration: 120m - test-e2e: 120m - test-e2e-podman: 120m - test-e2e-runtimes: 90m - test-e2e-config-ci: 120m - build: 30m - publish-utils-image: 30m - publish-image: 30m Fixes #3530
1 parent 60984e7 commit e92b074

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/functions.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
precheck:
3535
name: Precheck
3636
runs-on: ubuntu-latest
37+
timeout-minutes: 15
3738
steps:
3839
- uses: actions/checkout@v4
3940
- uses: knative/actions/setup-go@main
@@ -63,6 +64,7 @@ jobs:
6364
- "macos-14" # ARM
6465
- "windows-latest"
6566
runs-on: ${{ matrix.os }}
67+
timeout-minutes: 30
6668
steps:
6769
- name: Disable CRLF conversion (Windows)
6870
if: runner.os == 'Windows'
@@ -98,6 +100,7 @@ jobs:
98100
- "macos-14" # ARM
99101
- "windows-latest"
100102
runs-on: ${{ matrix.os }}
103+
timeout-minutes: 60
101104
steps:
102105
# Setup
103106
- name: Disable CRLF conversion (Windows)
@@ -135,6 +138,7 @@ jobs:
135138
name: Integration Tests
136139
needs: precheck
137140
runs-on: ubuntu-latest
141+
timeout-minutes: 120
138142
env:
139143
FUNC_CLUSTER_RETRIES: 5
140144
FUNC_INT_TEKTON_ENABLED: true
@@ -198,6 +202,7 @@ jobs:
198202
name: E2E - Core, Metadata, and Remote
199203
needs: precheck
200204
runs-on: ubuntu-latest
205+
timeout-minutes: 120
201206
env:
202207
FUNC_CLUSTER_RETRIES: 5
203208
FUNC_E2E_CLEAN: false # cluster only used once
@@ -251,6 +256,7 @@ jobs:
251256
test-e2e-podman:
252257
name: E2E - Podman
253258
needs: precheck
259+
timeout-minutes: 120
254260
strategy:
255261
matrix:
256262
os:
@@ -316,6 +322,7 @@ jobs:
316322
- "quarkus"
317323
- "springboot"
318324
runs-on: ubuntu-latest
325+
timeout-minutes: 90
319326
env:
320327
FUNC_CLUSTER_RETRIES: 5 # Cluster allocation retries
321328
FUNC_E2E_CLEAN: false # Skip deletes (cluster not reused)
@@ -395,6 +402,7 @@ jobs:
395402
name: E2E - Config CI GitHub Workflows
396403
needs: precheck
397404
runs-on: ubuntu-latest
405+
timeout-minutes: 120
398406
env:
399407
FUNC_CLUSTER_RETRIES: 5
400408
FUNC_E2E_CLEAN: false
@@ -455,6 +463,7 @@ jobs:
455463
- test-e2e-config-ci
456464
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
457465
runs-on: ubuntu-latest
466+
timeout-minutes: 30
458467
steps:
459468
- uses: actions/checkout@v4
460469
- uses: knative/actions/setup-go@main
@@ -493,6 +502,7 @@ jobs:
493502
name: Publish Utils Image
494503
needs: build
495504
runs-on: ubuntu-latest
505+
timeout-minutes: 30
496506
steps:
497507
- uses: actions/checkout@v4
498508
- uses: knative/actions/setup-go@main
@@ -535,6 +545,7 @@ jobs:
535545
name: Publish as Image
536546
needs: build
537547
runs-on: ubuntu-latest
548+
timeout-minutes: 30
538549
steps:
539550
- uses: actions/checkout@v4
540551
- uses: knative/actions/setup-go@main

0 commit comments

Comments
 (0)