Skip to content

Commit

Permalink
ci: add build timeouts (#3172)
Browse files Browse the repository at this point in the history
This should prevent runaway builds.

I noticed this issue when working on a fork of #2836.  Example builds with/without these timeouts:

1. 6 hours: https://github.com/alxndrsn/node-postgres/actions/runs/8277192701
2. 10 minutes: https://github.com/alxndrsn/node-postgres/actions/runs/8277388503

These timeouts are 4-5x what a current healthy build takes.
  • Loading branch information
alxndrsn authored Mar 15, 2024
1 parent 1481f8d commit 641ab43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ permissions:

jobs:
lint:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -20,6 +21,7 @@ jobs:
- run: yarn install --frozen-lockfile
- run: yarn lint
build:
timeout-minutes: 10
needs: lint
services:
postgres:
Expand Down

0 comments on commit 641ab43

Please sign in to comment.