@@ -19,14 +19,15 @@ jobs:
19
19
if : startsWith(github.ref, 'refs/heads/pull-request/')
20
20
runs-on : ubuntu-latest
21
21
outputs :
22
- any_changed : ${{ steps.changed-tests .outputs.any_changed }}
22
+ any_changed : ${{ steps.compute-any-changed .outputs.any_changed }}
23
23
steps :
24
24
- uses : actions/checkout@v4
25
25
- id : get-pr-info
26
26
uses : nv-gha-runners/get-pr-info@main
27
27
- name : Check for changes in test-relevant directories
28
28
id : changed-tests
29
29
uses :
step-security/[email protected]
30
+ continue-on-error : true
30
31
with :
31
32
files : |
32
33
.github/workflows/gpu_tests.yml
36
37
pyproject.toml
37
38
setup.py
38
39
base_sha : ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.ref }}
40
+ # Sometimes fails if commits are force pushed on the PR
41
+ fail_on_initial_diff_error : true
42
+ - name : Compute any_changed (fallback to true on failure)
43
+ id : compute-any-changed
44
+ if : ${{ always() }}
45
+ run : |
46
+ if [ "${{ steps.changed-tests.outcome }}" != "success" ]; then
47
+ echo "any_changed=true" >> "$GITHUB_OUTPUT"
48
+ else
49
+ echo "any_changed=${{ steps.changed-tests.outputs.any_changed }}" >> "$GITHUB_OUTPUT"
50
+ fi
39
51
wait-checks :
40
52
needs : [check-file-changes]
41
53
if : needs.check-file-changes.outputs.any_changed == 'true'
70
82
timeout-minutes : 90
71
83
container : *gpu_container
72
84
steps : *gpu_steps
85
+ gpu-pr-required-check :
86
+ # Run even if gpu-tests-pr is skipped
87
+ if : ${{ startsWith(github.ref, 'refs/heads/pull-request/') && always() }}
88
+ needs : [check-file-changes, gpu-tests-pr]
89
+ runs-on : ubuntu-latest
90
+ steps :
91
+ - name : Required GPU tests did not succeed
92
+ if : ${{ needs.check-file-changes.outputs.any_changed == 'true' && needs.gpu-tests-pr.result != 'success' }}
93
+ run : exit 1
0 commit comments