Skip to content

Commit 6716859

Browse files
committed
update ci test;
Signed-off-by: lawrence-cj <[email protected]>
1 parent 3ba7620 commit 6716859

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
name: ci
22
on:
3+
workflow_dispatch:
4+
inputs:
5+
run_tests:
6+
description: 'Run tests-bash'
7+
required: false
8+
type: boolean
9+
default: false
310
pull_request:
11+
types: [labeled, unlabeled]
412
push:
513
branches: [main, feat/Sana-public, feat/Sana-public-for-NVLab]
614
concurrency:
@@ -21,7 +29,12 @@ jobs:
2129
uses: pre-commit/[email protected]
2230
tests-bash:
2331
# 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
2538
steps:
2639
- name: Check out Git repository
2740
uses: actions/checkout@v4
@@ -35,6 +48,18 @@ jobs:
3548
- name: Run tests with Slurm
3649
run: |
3750
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+
})
3863
3964
# tests-python:
4065
# needs: pre-commit

0 commit comments

Comments
 (0)