diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 9ae1afb..67d1805 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: lint: name: Lint (eslint) runs-on: ubuntu-latest + timeout-minutes: 20 # a hung step fails instead of blocking main container: node:20-bookworm steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 @@ -46,6 +47,7 @@ jobs: test: name: Test (jest) runs-on: ubuntu-latest + timeout-minutes: 20 container: node:20-bookworm steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 @@ -57,6 +59,7 @@ jobs: audit: name: Security (npm audit) runs-on: ubuntu-latest + timeout-minutes: 10 container: node:20-bookworm steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 @@ -85,6 +88,7 @@ jobs: integration: name: Integration (api) runs-on: ubuntu-latest + timeout-minutes: 25 container: node:20-bookworm # the server and workers on production's Node env: DB_HOST: 127.0.0.1 @@ -109,6 +113,7 @@ jobs: scan: name: Scan (secrets, workflows, shell) runs-on: ubuntu-latest + timeout-minutes: 20 container: node:20-bookworm steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 @@ -147,6 +152,7 @@ jobs: ui: name: UI (playwright) runs-on: ubuntu-latest + timeout-minutes: 30 # Official image with Chromium and its system libraries; its version must match # @playwright/test in package.json. container: mcr.microsoft.com/playwright:v1.64.1-noble @@ -182,6 +188,7 @@ jobs: ui-screenshots: name: UI screenshots (before/after) runs-on: ubuntu-latest + timeout-minutes: 30 if: github.event_name == 'pull_request' container: mcr.microsoft.com/playwright:v1.64.1-noble env: @@ -231,6 +238,7 @@ jobs: deploy: name: Deploy runs-on: ubuntu-latest + timeout-minutes: 15 needs: [lint, test, audit, scan, integration, ui] if: github.event_name == 'push' && github.ref == 'refs/heads/main' # Never run two deploys at once; queue instead of cancelling a deploy mid-way. @@ -290,6 +298,7 @@ jobs: deploy-worker: name: Deploy worker runs-on: ubuntu-latest + timeout-minutes: 15 container: node:20-bookworm needs: [deploy] # the server first: it must understand anything new the worker sends if: github.event_name == 'push' && github.ref == 'refs/heads/main' @@ -356,6 +365,7 @@ jobs: notify: name: Notify runs-on: ubuntu-latest + timeout-minutes: 5 needs: [lint, test, audit, scan, integration, ui, deploy, deploy-worker] # Alert on any failure on main or in the weekly audit, and on every deploy outcome. if: >-