Skip to content

Commit b821b44

Browse files
Run tests after checks
Signed-off-by: Keval Morabia <[email protected]>
1 parent 7397ff1 commit b821b44

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Wait for checks
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
match_pattern:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
wait:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
checks: read
15+
steps:
16+
- name: Wait for checks (PRs only)
17+
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/pull-request/')
18+
uses: poseidon/[email protected]
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
match_pattern: ${{ inputs.match_pattern }}

.github/workflows/gpu_tests.yml

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

2020
jobs:
21+
wait-dco:
22+
uses: ./.github/workflows/_wait_for_checks.yml
23+
secrets: inherit
24+
with:
25+
match_pattern: '^DCO$'
26+
wait-unit-tests:
27+
needs: [wait-dco]
28+
uses: ./.github/workflows/_wait_for_checks.yml
29+
secrets: inherit
30+
with:
31+
match_pattern: 'Unit tests / linux.*'
2132
gpu-tests:
33+
needs: [wait-unit-tests]
2234
# Runner list at https://github.com/nv-gha-runners/enterprise-runner-configuration/blob/main/docs/runner-groups.md
2335
runs-on: linux-amd64-gpu-h100-latest-1
2436
timeout-minutes: 60

.github/workflows/unit_tests.yml

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

2828
jobs:
29+
wait-dco:
30+
uses: ./.github/workflows/_wait_for_checks.yml
31+
secrets: inherit
32+
with:
33+
match_pattern: '^DCO$'
2934
linux:
35+
needs: [wait-dco]
3036
runs-on: ubuntu-latest
3137
timeout-minutes: 30
3238
steps:

0 commit comments

Comments
 (0)