Skip to content

Commit e176891

Browse files
authored
Cancel the workflows in progress in newer build is about to start (#11)
1 parent ce76b90 commit e176891

File tree

7 files changed

+33
-4
lines changed

7 files changed

+33
-4
lines changed

.github/workflows/bench.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
description: 'New Ref'
1313
required: true
1414

15+
# Cancel the workflow in progress in newer build is about to start.
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
1520
env:
1621
GO111MODULE: "on"
1722
CACHE_BENCHMARK: "off" # Enables benchmark result reuse between runs, may skew latency results.

.github/workflows/cloc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
name: cloc
33
on:
44
pull_request:
5+
6+
# Cancel the workflow in progress in newer build is about to start.
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: true
10+
511
jobs:
612
cloc:
713
runs-on: ubuntu-latest

.github/workflows/golangci-lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ on:
88
- master
99
- main
1010
pull_request:
11+
12+
# Cancel the workflow in progress in newer build is about to start.
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15+
cancel-in-progress: true
16+
1117
jobs:
1218
golangci:
1319
name: golangci-lint

.github/workflows/gorelease.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
name: gorelease
33
on:
44
pull_request:
5+
6+
# Cancel the workflow in progress in newer build is about to start.
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
9+
cancel-in-progress: true
10+
511
env:
612
GO_VERSION: 1.17.x
713
jobs:

.github/workflows/test-unit.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
- master
77
- main
88
pull_request:
9+
10+
# Cancel the workflow in progress in newer build is about to start.
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
915
env:
1016
GO111MODULE: "on"
1117
RUN_BASE_COVERAGE: "on" # Runs test for PR base in case base test coverage is missing.
@@ -14,7 +20,7 @@ jobs:
1420
test:
1521
strategy:
1622
matrix:
17-
go-version: [ 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, tip ]
23+
go-version: [ 1.16.x, 1.17.x, tip ]
1824
runs-on: ubuntu-latest
1925
steps:
2026
- name: Install Go stable

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/bool64/ctxd
33
go 1.17
44

55
require (
6-
github.com/bool64/dev v0.2.6
6+
github.com/bool64/dev v0.2.7
77
github.com/stretchr/testify v1.7.0
88
github.com/swaggest/usecase v1.1.2
99
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
github.com/bool64/dev v0.2.5/go.mod h1:cTHiTDNc8EewrQPy3p1obNilpMpdmlUesDkFTF2zRWU=
2-
github.com/bool64/dev v0.2.6 h1:sMqjLqAX1fwk29k7s2DlHjIBFEKPmx0x8QEn0JShkJY=
3-
github.com/bool64/dev v0.2.6/go.mod h1:/csLrm+4oDSsKJRIVS0mrywAonLnYKFG8RvGT7Jh9b8=
2+
github.com/bool64/dev v0.2.7 h1:Zs1mCSJJwe8zBGLrlQ6pjuVUJjQtYbQslvxBwlzrYqo=
3+
github.com/bool64/dev v0.2.7/go.mod h1:/csLrm+4oDSsKJRIVS0mrywAonLnYKFG8RvGT7Jh9b8=
44
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
55
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
66
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

0 commit comments

Comments
 (0)