From 641ab436a0fb356ae2016a9bd71c3e48cc04b5cb Mon Sep 17 00:00:00 2001 From: Alex Anderson <191496+alxndrsn@users.noreply.github.com> Date: Fri, 15 Mar 2024 08:53:08 +0300 Subject: [PATCH] ci: add build timeouts (#3172) 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 57a2e6bc1..2f93b816d 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 --frozen-lockfile - run: yarn lint build: + timeout-minutes: 10 needs: lint services: postgres: