Skip to content

Commit

Permalink
Merge pull request #1184 from jakob-keller/github-workflow-job-timeout
Browse files Browse the repository at this point in the history
Set `timeout-minutes` property for all GitHub Actions workflow jobs and check via pre-commit hook
  • Loading branch information
jakob-keller authored Aug 23, 2024
2 parents 18aee5b + 712730e commit 7664723
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:
- aiohttp-version: <4.0.0
python-version: 3.11
fail-fast: false
timeout-minutes: 15
timeout-minutes: 5

steps:
- name: Checkout
Expand Down Expand Up @@ -111,6 +112,7 @@ jobs:
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
timeout-minutes: 5

steps:
- name: Download distribution 📦
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
pre-commit:
runs-on: ubuntu-20.04
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
permissions:
issues: write
pull-requests: write
timeout-minutes: 5

steps:
- uses: actions/stale@v9
Expand Down
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ repos:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs
- id: check-jsonschema
alias: check-github-workflows-require-timeout
name: Check GitHub Actions workflow jobs set timeout-minutes
args:
- --builtin-schema
- github-workflows-require-timeout
files: ^\.github/workflows/[^/]+$
types:
- yaml

0 comments on commit 7664723

Please sign in to comment.