Skip to content

Commit

Permalink
autocancel CI when new commit is made on a pull request (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krastanov authored Nov 21, 2024
1 parent 3853538 commit 615311f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci-julia-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ on:
branches: [master, main]
tags: ["*"]
pull_request:

concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the master branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main') || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

env:
PYTHON: ~
jobs:
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ on:
branches: [master, main]
tags: ["*"]
pull_request:

concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the master branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ (github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main') || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

env:
PYTHON: ~
jobs:
Expand All @@ -14,14 +22,28 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1'
- '1.10'
os:
- ubuntu-latest
threads:
- '1'
- '5'
arch:
- x64
include:
- arch: aarch64
os: macos-latest
version: '1'
threads: '1'
- arch: x64
os: macos-latest
version: '1'
threads: '1'
- arch: x64
os: windows-latest
version: '1'
threads: '1'
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
Expand All @@ -30,12 +52,9 @@ jobs:
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
env:
JULIA_CONDAPKG_VERBOSITY: "1"
- uses: julia-actions/julia-runtest@v1
env:
JULIA_NUM_THREADS: ${{ matrix.threads }}
JULIA_CONDAPKG_VERBOSITY: "1"
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
Expand Down

0 comments on commit 615311f

Please sign in to comment.