Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fengzch-das
nunchaku
Commits
c7bc61bf
Unverified
Commit
c7bc61bf
authored
Jul 26, 2025
by
Muyang Li
Committed by
GitHub
Jul 26, 2025
Browse files
chore: better pr-test (#570)
* chore: better pr-test * update the paths
parent
6b2e7c41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
12 deletions
+17
-12
.github/workflows/pr-test.yaml
.github/workflows/pr-test.yaml
+17
-12
No files found.
.github/workflows/pr-test.yaml
View file @
c7bc61bf
...
...
@@ -8,8 +8,13 @@ on:
-
"
tests/**"
-
"
examples/**"
-
"
scripts/**"
repository_dispatch
:
types
:
[
pr-test
]
-
"
.github/workflows/**"
workflow_dispatch
:
inputs
:
ref
:
description
:
'
Branch,
tag,
or
SHA
to
test
(default:
main)'
required
:
false
default
:
'
main'
concurrency
:
group
:
${{ github.repository }}-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress
:
true
...
...
@@ -21,10 +26,10 @@ jobs:
runs-on
:
-
self-hosted
-
${{ matrix.gpu }}
# Only run for non-draft PRs, or for
repository
_dispatch events
# Only run for non-draft PRs, or for
workflow
_dispatch events
if
:
|
(github.event_name == 'pull_request' && !github.event.pull_request.draft) ||
(github.event_name == '
repository
_dispatch')
(github.event_name == '
workflow
_dispatch')
steps
:
-
name
:
Determine ref
id
:
set-ref
...
...
@@ -32,10 +37,10 @@ jobs:
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# Use the merged commit SHA for PRs
echo "ref=${{ github.event.pull_request.merge_commit_sha }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "
repository
_dispatch" ]]; then
# Use github.event.
client_payload
.ref if provided, else default to main
if [[ -n "${{ github.event.
client_payload
.ref }}" ]]; then
echo "ref=${{ github.event.
client_payload
.ref }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "
workflow
_dispatch" ]]; then
# Use github.event.
inputs
.ref if provided, else default to main
if [[ -n "${{ github.event.
inputs
.ref }}" ]]; then
echo "ref=${{ github.event.
inputs
.ref }}" >> $GITHUB_OUTPUT
else
echo "ref=main" >> $GITHUB_OUTPUT
fi
...
...
@@ -80,8 +85,8 @@ jobs:
yes | comfy --here install --nvidia --skip-torch-or-directml --version 0.3.44
cd ComfyUI
rm -r models
mkdir -p ${{ secrets.COMFYUI_MODELS_ROOT
_AMPERE
}}
ln -s ${{ secrets.COMFYUI_MODELS_ROOT
_AMPERE
}} models
mkdir -p ${{ secrets.COMFYUI_MODELS_ROOT }}
ln -s ${{ secrets.COMFYUI_MODELS_ROOT }} models
cd custom_nodes
git clone -b dev https://github.com/mit-han-lab/ComfyUI-nunchaku.git
cd ..
...
...
@@ -105,8 +110,8 @@ jobs:
source $(conda info --base)/etc/profile.d/conda.sh
conda activate test_env || { echo "Failed to activate conda env"; exit 1; }
which python
NUNCHAKU_TEST_CACHE_ROOT=${{ secrets.NUNCHAKU_TEST_CACHE_ROOT
_AMPERE
}} HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -v tests/flux/test_flux_examples.py
NUNCHAKU_TEST_CACHE_ROOT=${{ secrets.NUNCHAKU_TEST_CACHE_ROOT
_AMPERE
}} HF_TOKEN=${{ secrets.HF_TOKEN }} python .github/workflows/run_all_tests.py
NUNCHAKU_TEST_CACHE_ROOT=${{ secrets.NUNCHAKU_TEST_CACHE_ROOT }} HF_TOKEN=${{ secrets.HF_TOKEN }} pytest -v tests/flux/test_flux_examples.py
NUNCHAKU_TEST_CACHE_ROOT=${{ secrets.NUNCHAKU_TEST_CACHE_ROOT }} HF_TOKEN=${{ secrets.HF_TOKEN }} python .github/workflows/run_all_tests.py
-
name
:
clean up
if
:
always()
run
:
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment