From 982466271f42d325f07857fc733c19b0cd203254 Mon Sep 17 00:00:00 2001 From: Viktor Delev Date: Thu, 16 Jan 2025 11:20:18 +0100 Subject: [PATCH] add timeout --- .github/workflows/build-node-python.yml | 9 +++++++++ .github/workflows/build-single-product-part.yml | 6 ++++++ .github/workflows/build-workspace-product-part.yml | 6 ++++++ .github/workflows/deploy-product.yml | 6 ++++++ 4 files changed, 27 insertions(+) diff --git a/.github/workflows/build-node-python.yml b/.github/workflows/build-node-python.yml index a5b2e95a..71e39958 100644 --- a/.github/workflows/build-node-python.yml +++ b/.github/workflows/build-node-python.yml @@ -81,6 +81,11 @@ on: required: false type: boolean default: false + timeout: + description: "Timeout for each job in minutes." + type: number + required: false + default: 60 secrets: DATAVISYN_BOT_REPO_TOKEN: @@ -114,6 +119,7 @@ permissions: jobs: build-node: name: Node + timeout-minutes: ${{ fromJSON(inputs.timeout) }} 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')) }} concurrency: group: "node-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}" @@ -153,6 +159,7 @@ jobs: build-python: name: Python + timeout-minutes: ${{ fromJSON(inputs.timeout) }} 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')) }} concurrency: group: "python-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}" @@ -190,6 +197,7 @@ jobs: # If cypress is used, build node and python sequentially as it is avoiding the duplicate install overhead build-node-python-cypress: name: Node, Python, Cypress + timeout-minutes: ${{ fromJSON(inputs.timeout) }} if: ${{ inputs.cypress_enable && (inputs.cypress_run_because_flag || inputs.cypress_run_because_branch == 'true') }} concurrency: group: "node-python-cypress-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}" @@ -329,6 +337,7 @@ jobs: # If playwright is used, build node and python sequentially as it is avoiding the duplicate install overhead build-node-python-playwright: name: Node, Python, Playwright + timeout-minutes: ${{ fromJSON(inputs.timeout) }} if: ${{ inputs.playwright_enable && (inputs.playwright_run_because_flag || inputs.playwright_run_because_branch == 'true') }} concurrency: group: "node-python-playwright-${{ github.workflow }}-${{ github.ref || github.head_ref }}-${{ inputs.branch }}" diff --git a/.github/workflows/build-single-product-part.yml b/.github/workflows/build-single-product-part.yml index 482dd46f..90bda077 100644 --- a/.github/workflows/build-single-product-part.yml +++ b/.github/workflows/build-single-product-part.yml @@ -41,6 +41,11 @@ on: description: "stage for the image (develop or production) depending on the branch name" required: true type: string + timeout: + description: "Timeout for each job in minutes." + type: number + required: false + default: 60 env: TIME_ZONE: "Europe/Vienna" NODE_VERSION: "20.9" @@ -56,6 +61,7 @@ permissions: jobs: build-components: + timeout-minutes: ${{ fromJSON(inputs.timeout) }} runs-on: ubuntu-22.04 steps: - name: Remove unnecessary files diff --git a/.github/workflows/build-workspace-product-part.yml b/.github/workflows/build-workspace-product-part.yml index a3de2964..c2b8bbd4 100644 --- a/.github/workflows/build-workspace-product-part.yml +++ b/.github/workflows/build-workspace-product-part.yml @@ -38,6 +38,11 @@ on: description: "stage for the image (develop or production) depending on the branch name" required: true type: string + timeout: + description: "Timeout for each job in minutes." + type: number + required: false + default: 60 env: VISYN_SCRIPTS_VERSION: "v7" # visyn_scripts@v7 is the last version with workspace support TIME_ZONE: "Europe/Vienna" @@ -54,6 +59,7 @@ permissions: jobs: build-components: + timeout-minutes: ${{ fromJSON(inputs.timeout) }} runs-on: ubuntu-22.04 steps: # checkout specific repository diff --git a/.github/workflows/deploy-product.yml b/.github/workflows/deploy-product.yml index f7692bfc..a4d698d0 100644 --- a/.github/workflows/deploy-product.yml +++ b/.github/workflows/deploy-product.yml @@ -22,6 +22,11 @@ on: required: false type: boolean default: false + timeout: + description: "Timeout for each job in minutes." + type: number + required: false + default: 60 outputs: revision_label: description: "revision that is stored as a label" @@ -42,6 +47,7 @@ env: jobs: deploy: + timeout-minutes: ${{ fromJSON(inputs.timeout) }} runs-on: ubuntu-22.04 outputs: revision_label: ${{ steps.get-revision-label.outputs.revision_label }}