File tree Expand file tree Collapse file tree 4 files changed +23
-15
lines changed Expand file tree Collapse file tree 4 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ jobs:
1818 checks : read
1919 steps :
2020 - name : Wait for checks (PRs only)
21- if : github.event_name == 'pull_request' || startsWith(github.ref , 'refs/heads/pull-request/')
21+ if : github.event_name == 'pull_request' || startsWith(github.sha , 'refs/heads/pull-request/')
22222323 with :
2424 token : ${{ secrets.GITHUB_TOKEN }}
2525 match_pattern : ${{ inputs.match_pattern }}
2626 delay : ${{ inputs.delay }}
2727 - name : No-op for non-PR events
28- if : github.event_name != 'pull_request' && !startsWith(github.ref , 'refs/heads/pull-request/')
28+ if : github.event_name != 'pull_request' && !startsWith(github.sha , 'refs/heads/pull-request/')
2929 run : echo "Not a pull_request event"
Original file line number Diff line number Diff line change @@ -3,18 +3,11 @@ name: GPU tests
33on :
44 push :
55 branches : ["pull-request/[0-9]+"]
6- # TODO: paths cannot be used since push happens to copied PR and only latest commit to PR is used
7- # paths:
8- # - ".github/workflows/gpu_tests.yml"
9- # - "modelopt/**"
10- # - "tests/gpu/**"
11- # - "pyproject.toml"
12- # - "setup.py"
13- # - "tox.ini"
6+ # NOTE: paths cannot be used since push happens to copied PR and only latest commit to PR is used
147
158# Cancel previous runs if new commit is pushed to the same PR
169concurrency :
17- group : ${{ github.workflow }}-${{ github.ref }}
10+ group : ${{ github.workflow }}-${{ github.sha }}
1811 cancel-in-progress : true
1912
2013jobs :
4740 PIP_CONSTRAINT : " " # Disable pip constraint for upgrading packages
4841 steps :
4942 - uses : actions/checkout@v4
50- - name : Setup proxy cache
51- uses : nv-gha-runners/setup-proxy-cache@main
43+ - uses : nv-gha-runners/setup-proxy-cache@main
44+ # Check if relevant files are changed in PR else skip gpu tests
45+ - id : get-pr-info
46+ uses : nv-gha-runners/get-pr-info@main
47+ - name : Check for changes in test-relevant directories
48+ id : changed-tests
49+ uses :
step-security/[email protected] 50+ with :
51+ files : |
52+ .github/workflows/gpu_tests.yml
53+ modelopt/**
54+ tests/gpu/**
55+ tox.ini
56+ pyproject.toml
57+ setup.py
58+ base_sha : ${{ fromJSON(steps.get-pr-info.outputs.pr-info).base.ref }}
5259 - name : Run gpu tests
60+ if : steps.changed-tests.outputs.any_changed == 'true'
5361 run : pip install tox-current-env && tox -e py312-cuda12-gpu --current-env
Original file line number Diff line number Diff line change 88
99# Cancel previous runs if new commit is pushed
1010concurrency :
11- group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1212 cancel-in-progress : true
1313
1414# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Original file line number Diff line number Diff line change 2222
2323# Cancel previous runs if new commit is pushed
2424concurrency :
25- group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
25+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
2626 cancel-in-progress : true
2727
2828jobs :
You can’t perform that action at this time.
0 commit comments