From 55395aa5378db33b36574de2b6c217f776dc1841 Mon Sep 17 00:00:00 2001 From: alxndrsn Date: Thu, 14 Mar 2024 08:08:59 +0000 Subject: [PATCH] ci: add build timeouts This should prevent runaway builds. I noticed this issue when working on a fork of https://github.com/brianc/node-postgres/pull/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. --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37b394f1f..4567fff40 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ permissions: jobs: lint: + timeout-minutes: 5 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -20,6 +21,7 @@ jobs: - run: yarn install - run: yarn lint build: + timeout-minutes: 10 needs: lint services: postgres: