Skip to content

Commit 3f2d7fe

Browse files
committed
A different concurrency test now
1 parent 17d62eb commit 3f2d7fe

1 file changed

Lines changed: 23 additions & 18 deletions

File tree

.github/workflows/test-concurrency.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,33 @@ name: Concurrency test
22
on:
33
workflow_dispatch:
44
inputs:
5-
workflowgroup:
6-
description: Group for the workflow
7-
type: choice
8-
default: none
9-
options:
10-
- a
11-
- b
12-
- none
13-
jobgroup:
14-
description: Group for the job
15-
type: string
5+
delay:
6+
description: Job delay
7+
required: true
8+
type: number
9+
default: 60
1610

17-
concurrency:
18-
group: ${{ case( inputs.workflowgroup == 'none', github.run_id, inputs.workflowgroup ) }}
19-
cancel-in-progress: true
11+
env:
12+
DELAY: ${{ inputs.delay }}
2013

2114
jobs:
22-
thejob:
23-
name: The job; workflowgroup=${{ inputs.workflowgroup }} jobgroup=${{ inputs.jobgroup }}
15+
a:
16+
name: A
17+
runs-on: ubuntu-latest
18+
steps:
19+
- run: sleep "$DELAY"
20+
b:
21+
name: B
22+
needs: [ a ]
23+
runs-on: ubuntu-latest
24+
steps:
25+
- run: sleep 10
26+
c:
27+
name: C
28+
needs: [ b ]
2429
runs-on: ubuntu-latest
2530
concurrency:
26-
group: ${{ inputs.jobgroup }}
31+
group: test
2732
queue: max
2833
steps:
29-
- run: sleep 300
34+
- run: sleep 10

0 commit comments

Comments
 (0)