Skip to content

Commit

Permalink
ci(workflow): set time limit to workflow run (#380)
Browse files Browse the repository at this point in the history
Because

- We have to create logic to cancel previous workflow if new one it
triggered
- We have to set time limit for each workflow run

This commit

- set time limit to workflow run
  • Loading branch information
Sarthak-instill authored and donch1989 committed Oct 27, 2023
1 parent a88ab8e commit 6bda63f
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 15 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/helm-integration-test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ jobs:
helm-integration-test-latest-linux:
if: inputs.target == 'latest'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0

# mono occupies port 8084 which conflicts with mgmt-backend
- name: Stop mono service
run: |
Expand Down Expand Up @@ -112,7 +116,11 @@ jobs:
helm-integration-test-latest-mac:
if: inputs.target == 'latest' && github.ref == 'refs/heads/main'
runs-on: [self-hosted, macOS, vdp]
timeout-minutes: 20
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0

- name: Set up environment
run: |
brew install make
Expand Down Expand Up @@ -235,7 +243,11 @@ jobs:
helm-integration-test-release-linux:
if: inputs.target == 'release'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0

# mono occupies port 8084 which conflicts with mgmt-backend
- name: Stop mono service
run: |
Expand Down Expand Up @@ -339,7 +351,11 @@ jobs:
helm-integration-test-release-mac:
if: inputs.target == 'release'
runs-on: [self-hosted, macOS, vdp]
timeout-minutes: 20
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0

- name: Set up environment
run: |
brew install make
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/helm-integration-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Helm Integration Test (release)

on:
workflow_dispatch:
push:
branches:
- release-please--branches--main
tags:
- v*

jobs:
backend:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/integration-test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ jobs:
integration-test-latest-linux:
if: inputs.target == 'latest'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0

# mono occupies port 8084 which conflicts with mgmt-backend
- name: Stop mono service
run: |
Expand Down Expand Up @@ -91,7 +95,15 @@ jobs:
integration-test-latest-mac:
if: inputs.target == 'latest' && github.ref == 'refs/heads/main'
runs-on: [self-hosted, macOS, vdp]
timeout-minutes: 20
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0

- name: remove existing docker container
run: |
docker rm -f $(docker ps -a -q)
- name: Set up environment
run: |
brew install make
Expand Down Expand Up @@ -204,7 +216,11 @@ jobs:
integration-test-release-linux:
if: inputs.target == 'release'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0

# mono occupies port 8084 which conflicts with mgmt-backend
- name: Stop mono service
run: |
Expand Down Expand Up @@ -283,7 +299,15 @@ jobs:
integration-test-release-mac:
if: inputs.target == 'release'
runs-on: [self-hosted, macOS, vdp]
timeout-minutes: 20
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0

- name: remove existing docker container
run: |
docker rm -f $(docker ps -a -q)
- name: Set up environment
run: |
brew install make
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/integration-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Integration Test (release)

on:
workflow_dispatch:
push:
branches:
- release-please--branches--main
tags:
- v*

jobs:
backend:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/make-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: Make All

on:
workflow_dispatch:
push:
branches:
- release-please--branches--main
tags:
- v*

jobs:
make-all:
Expand Down

0 comments on commit 6bda63f

Please sign in to comment.