From 463c8426e0b7a24aa62969a12ab541aae0ffc2af Mon Sep 17 00:00:00 2001 From: AminDhouib Date: Tue, 15 Sep 2026 20:24:31 -0400 Subject: [PATCH] ci: add per-job timeout-minutes to CI and publish workflows Every job in this repository could previously run until the GitHub 6 h ceiling. A hung job therefore held a runner slot for hours. Each job now carries an explicit timeout-minutes. Rule: the budget is 3 x the job's observed p90 duration, rounded up to the nearest 5 minutes. Where 72 h of run history contains no completed sample for a job, the class default for that job's class is used instead. Every job below falls in the second case. .github/workflows/ci.yml lint 15 class default (lint), unobserved unit-test 45 class default (e2e), unobserved e2e-test 45 class default (e2e), unobserved .github/workflows/publish.yml build-and-publish 30 class default (build), unobserved No concurrency change: ci.yml already declares a workflow-level concurrency group with cancel-in-progress, and publish.yml ships to PyPI behind a gated environment, so superseded runs there must never be cancelled. Job names, job count and workflow triggers are unchanged. --- .github/workflows/ci.yml | 3 +++ .github/workflows/publish.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5fd7293..af21552 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ concurrency: jobs: lint: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -28,6 +29,7 @@ jobs: unit-test: runs-on: ubuntu-latest + timeout-minutes: 45 strategy: fail-fast: false matrix: @@ -44,6 +46,7 @@ jobs: e2e-test: runs-on: ubuntu-latest + timeout-minutes: 45 needs: [lint, unit-test] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 169f97f..49405a2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,6 +12,7 @@ on: jobs: build-and-publish: runs-on: ubuntu-latest + timeout-minutes: 30 environment: pypi permissions: id-token: write # required for PyPI trusted publishing