Skip to content

Commit 8a1778f

Browse files
Wait for DCO before tests
Signed-off-by: Keval Morabia <[email protected]>
1 parent 7397ff1 commit 8a1778f

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Wait for checks
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
match_pattern:
7+
required: true
8+
type: string
9+
delay:
10+
required: false
11+
type: string
12+
default: 10s
13+
14+
jobs:
15+
wait:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
checks: read
19+
steps:
20+
- name: Wait for checks (PRs only)
21+
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/pull-request/')
22+
uses: poseidon/[email protected]
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
match_pattern: ${{ inputs.match_pattern }}
26+
delay: ${{ inputs.delay }}
27+
- name: No-op for non-PR events
28+
if: github.event_name != 'pull_request' && !startsWith(github.ref, 'refs/heads/pull-request/')
29+
run: echo "Not a pull_request event"

.github/workflows/gpu_tests.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,24 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21+
wait-dco:
22+
uses: ./.github/workflows/_wait_for_checks.yml
23+
permissions:
24+
checks: read
25+
secrets: inherit
26+
with:
27+
match_pattern: '^DCO$'
28+
wait-unit-tests:
29+
needs: [wait-dco]
30+
uses: ./.github/workflows/_wait_for_checks.yml
31+
permissions:
32+
checks: read
33+
secrets: inherit
34+
with:
35+
match_pattern: '^Unit tests / linux$'
36+
delay: 60s
2137
gpu-tests:
38+
needs: [wait-unit-tests]
2239
# Runner list at https://github.com/nv-gha-runners/enterprise-runner-configuration/blob/main/docs/runner-groups.md
2340
runs-on: linux-amd64-gpu-h100-latest-1
2441
timeout-minutes: 60

.github/workflows/unit_tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ concurrency:
2626
cancel-in-progress: true
2727

2828
jobs:
29+
wait-dco:
30+
uses: ./.github/workflows/_wait_for_checks.yml
31+
permissions:
32+
checks: read
33+
secrets: inherit
34+
with:
35+
match_pattern: '^DCO$'
2936
linux:
37+
needs: [wait-dco]
3038
runs-on: ubuntu-latest
3139
timeout-minutes: 30
3240
steps:

0 commit comments

Comments
 (0)