Skip to content

Commit

Permalink
feat: add timeouts to all jobs (#1448)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts authored Sep 27, 2023
1 parent 64eef7d commit e88a6ea
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
name: CodeQL
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: github/codeql-action/init@v2
Expand All @@ -34,6 +35,7 @@ jobs:
name: Trivy Security Scan
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in repo mode
Expand All @@ -55,6 +57,7 @@ jobs:
name: Tests
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-22.04
timeout-minutes: 5
services:
postgres:
image: postgres
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
- name: frontend
file: frontend/openshift.deploy.yml
overwrite: true
timeout-minutes: 10
steps:
- uses: bcgov-nr/action-deployer-openshift@v2.0.0
with:
Expand All @@ -55,6 +56,7 @@ jobs:
run:
working-directory: integration-tests
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- id: cache-npm
Expand Down Expand Up @@ -85,6 +87,7 @@ jobs:
strategy:
matrix:
browser: [chrome, firefox, edge]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- id: cache-npm
Expand Down Expand Up @@ -119,6 +122,7 @@ jobs:
strategy:
matrix:
name: [database, migrations, backend, frontend]
timeout-minutes: 1
steps:
- name: Keep last 50
uses: actions/delete-package-versions@v4
Expand All @@ -133,6 +137,7 @@ jobs:
needs: [integration-tests, cypress-e2e]
environment: prod
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
matrix:
name: [database, backend, frontend]
Expand Down Expand Up @@ -171,6 +176,7 @@ jobs:
strategy:
matrix:
component: [database, backend, frontend]
timeout-minutes: 1
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
Expand All @@ -196,6 +202,7 @@ jobs:
--health-retries 5
ports:
- 5432:5432
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: joshuaavalon/flyway-action@v3.0.0
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-close.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
name: Cleanup OpenShift
if: "!github.event.pull_request.head.repo.fork"
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Remove OpenShift artifacts
run: |
Expand All @@ -35,6 +36,7 @@ jobs:
strategy:
matrix:
package: [database, migrations, backend, frontend]
timeout-minutes: 1
steps:
- uses: shrink/actions-docker-registry-tag@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pr-open.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
runs-on: ubuntu-22.04
permissions:
pull-requests: write
timeout-minutes: 1
steps:
- name: PR Greeting
uses: bcgov-nr/action-pr-description-add@v1.1.0
Expand Down Expand Up @@ -61,6 +62,7 @@ jobs:
triggers: ('backend/')
- package: frontend
triggers: ('frontend/')
timeout-minutes: 10
steps:
- uses: bcgov-nr/action-builder-ghcr@v1.2.1
with:
Expand All @@ -78,6 +80,7 @@ jobs:
if: "!github.event.pull_request.head.repo.fork"
needs: [builds]
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
matrix:
name: [database, backend, frontend]
Expand Down

0 comments on commit e88a6ea

Please sign in to comment.