Skip to content

Commit

Permalink
ci: add build timeouts
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 brianc#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 committed Mar 14, 2024
1 parent 1190782 commit 55395aa
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
- run: yarn lint
build:
timeout-minutes: 10
needs: lint
services:
postgres:
Expand Down

0 comments on commit 55395aa

Please sign in to comment.