File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 1
1
name : ci
2
2
on :
3
+ workflow_dispatch :
4
+ inputs :
5
+ run_tests :
6
+ description : ' Run tests-bash'
7
+ required : false
8
+ type : boolean
9
+ default : false
3
10
pull_request :
11
+ types : [labeled, unlabeled]
4
12
push :
5
13
branches : [main, feat/Sana-public, feat/Sana-public-for-NVLab]
6
14
concurrency :
21
29
uses :
pre-commit/[email protected]
22
30
tests-bash :
23
31
# needs: pre-commit
24
- runs-on : self-hosted
32
+ if : |
33
+ github.event_name == 'workflow_dispatch' && github.event.inputs.run_tests == 'true' ||
34
+ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-tests')
35
+ runs-on :
36
+ - self-hosted
37
+ - sana-runner
25
38
steps :
26
39
- name : Check out Git repository
27
40
uses : actions/checkout@v4
35
48
- name : Run tests with Slurm
36
49
run : |
37
50
sana-run --pty -m ci -J tests-bash bash tests/bash/entry.sh
51
+ - name : Remove run-tests label
52
+ if : github.event_name == 'pull_request'
53
+ uses : actions/github-script@v6
54
+ with :
55
+ github-token : ${{ secrets.GITHUB_TOKEN }}
56
+ script : |
57
+ github.rest.issues.removeLabel({
58
+ issue_number: context.issue.number,
59
+ owner: context.repo.owner,
60
+ repo: context.repo.repo,
61
+ name: 'run-tests'
62
+ })
38
63
39
64
# tests-python:
40
65
# needs: pre-commit
You can’t perform that action at this time.
0 commit comments