Skip to content

Commit 905c11c

Browse files
add timeout (#136)
1 parent 3fb27eb commit 905c11c

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

.github/workflows/build-node-python.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ on:
8181
required: false
8282
type: boolean
8383
default: false
84+
timeout:
85+
description: "Timeout for each job in minutes."
86+
type: number
87+
required: false
88+
default: 60
8489

8590
secrets:
8691
DATAVISYN_BOT_REPO_TOKEN:
@@ -114,6 +119,7 @@ permissions:
114119
jobs:
115120
build-node:
116121
name: Node
122+
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
117123
if: ${{ (!inputs.cypress_enable || (!inputs.cypress_run_because_flag && inputs.cypress_run_because_branch != 'true')) && (!inputs.playwright_enable || (!inputs.playwright_run_because_flag && inputs.playwright_run_because_branch != 'true')) }}
118124
concurrency:
119125
group: "node-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}"
@@ -153,6 +159,7 @@ jobs:
153159

154160
build-python:
155161
name: Python
162+
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
156163
if: ${{ (!inputs.cypress_enable || (!inputs.cypress_run_because_flag && inputs.cypress_run_because_branch != 'true')) && (!inputs.playwright_enable || (!inputs.playwright_run_because_flag && inputs.playwright_run_because_branch != 'true')) }}
157164
concurrency:
158165
group: "python-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}"
@@ -190,6 +197,7 @@ jobs:
190197
# If cypress is used, build node and python sequentially as it is avoiding the duplicate install overhead
191198
build-node-python-cypress:
192199
name: Node, Python, Cypress
200+
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
193201
if: ${{ inputs.cypress_enable && (inputs.cypress_run_because_flag || inputs.cypress_run_because_branch == 'true') }}
194202
concurrency:
195203
group: "node-python-cypress-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}"
@@ -329,6 +337,7 @@ jobs:
329337
# If playwright is used, build node and python sequentially as it is avoiding the duplicate install overhead
330338
build-node-python-playwright:
331339
name: Node, Python, Playwright
340+
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
332341
if: ${{ inputs.playwright_enable && (inputs.playwright_run_because_flag || inputs.playwright_run_because_branch == 'true') }}
333342
concurrency:
334343
group: "node-python-playwright-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}"

.github/workflows/build-single-product-part.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ on:
4141
description: "stage for the image (develop or production) depending on the branch name"
4242
required: true
4343
type: string
44+
timeout:
45+
description: "Timeout for each job in minutes."
46+
type: number
47+
required: false
48+
default: 60
4449
env:
4550
TIME_ZONE: "Europe/Vienna"
4651
NODE_VERSION: "20.9"
@@ -56,6 +61,7 @@ permissions:
5661

5762
jobs:
5863
build-components:
64+
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
5965
runs-on: ubuntu-22.04
6066
steps:
6167
- name: Remove unnecessary files

.github/workflows/build-workspace-product-part.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ on:
3838
description: "stage for the image (develop or production) depending on the branch name"
3939
required: true
4040
type: string
41+
timeout:
42+
description: "Timeout for each job in minutes."
43+
type: number
44+
required: false
45+
default: 60
4146
env:
4247
VISYN_SCRIPTS_VERSION: "v7" # visyn_scripts@v7 is the last version with workspace support
4348
TIME_ZONE: "Europe/Vienna"
@@ -54,6 +59,7 @@ permissions:
5459

5560
jobs:
5661
build-components:
62+
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
5763
runs-on: ubuntu-22.04
5864
steps:
5965
# checkout specific repository

.github/workflows/deploy-product.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
required: false
2323
type: boolean
2424
default: false
25+
timeout:
26+
description: "Timeout for each job in minutes."
27+
type: number
28+
required: false
29+
default: 60
2530
outputs:
2631
revision_label:
2732
description: "revision that is stored as a label"
@@ -42,6 +47,7 @@ env:
4247

4348
jobs:
4449
deploy:
50+
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
4551
runs-on: ubuntu-22.04
4652
outputs:
4753
revision_label: ${{ steps.get-revision-label.outputs.revision_label }}

0 commit comments

Comments
 (0)