Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cancel running ci workflows for pr branches #264

Merged
merged 2 commits into from
Mar 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:

workflow_dispatch:

# cancel same workflows in progress for pull request branches
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}


# global env vars, available in all jobs and steps
env:
Expand All @@ -35,6 +40,9 @@ jobs:
name: Unit tests
runs-on: ubuntu-latest

# max run time 5 minutes
timeout-minutes: 5
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added this as well.. sometimes jobs could hang and we want to avoid this..


steps:
- uses: actions/checkout@v3

Expand All @@ -55,6 +63,9 @@ jobs:
needs: [ build ]
runs-on: ubuntu-latest

# max run time 20 minutes
timeout-minutes: 20

strategy:

# let all tests run, can find multiple failures in different setup
Expand Down