Skip to content

Commit

Permalink
Merge pull request #1760 from mirpedrol/ci
Browse files Browse the repository at this point in the history
add cancel CI run if new run starts
  • Loading branch information
mirpedrol authored Aug 22, 2022
2 parents e91ef15 + 94691fe commit 940a042
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/create-lint-wf.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Create a pipeline and run nf-core linting
on: [push, pull_request]

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
NXF_ANSI_LOG: false

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Create a pipeline and test it
on: [push, pull_request]

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
NXF_ANSI_LOG: false

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
release:
types: [published]

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-n-publish:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Lint tools code formatting
on: [push, pull_request]

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
EditorConfig:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/push_dockerhub_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
push:
branches: [dev]

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
push_dockerhub:
name: Push new Docker image to Docker Hub (dev)
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/push_dockerhub_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
release:
types: [published]

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
push_dockerhub:
name: Push new Docker image to Docker Hub (release)
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
push:
pull_request:

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
pytest:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
description: Only run on nf-core/testpipeline?
required: true

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
get-pipelines:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/tools-api-docs-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: nf-core/tools dev API docs
# Run on push and PR to test that docs build
on: [pull_request, push]

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
api-docs:
name: Build & push Sphinx API docs
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/tools-api-docs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
release:
types: [published]

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
api-docs:
name: Build & push Sphinx API docs
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
- Move `strip_ansi_code` function in lint to `utils.py`
- Simplify control flow and don't use equality comparison for `None` and booleans
- Replace use of the deprecated `distutils` Version object with that from `packaging` ([#1735](https://github.com/nf-core/tools/pull/1735))
- Add code to cancel CI run if a new run starts ([#1760](https://github.com/nf-core/tools/pull/1760))

### Modules

Expand Down

0 comments on commit 940a042

Please sign in to comment.