-
Notifications
You must be signed in to change notification settings - Fork 377
refactor: Reorganize GitHub Actions for better reusability #5949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
a1a5dd0
bca84ef
a2388ff
0589f0f
ce3218d
4bc799b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Setup ComfyUI Server | ||
description: 'Setup ComfyUI server for continuous integration (with ComfyUI_devtools node installed)' | ||
inputs: | ||
extra_server_params: | ||
description: 'Additional parameters to pass to ComfyUI server' | ||
required: false | ||
default: '' | ||
launch_server: | ||
description: 'Whether to launch the server after setup' | ||
required: false | ||
default: 'true' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
# Note: this workflow assume frontend repo is checked out and is built in ../dist | ||
|
||
# Checkout ComfyUI repo, install the dev_tools node and start server | ||
- name: Checkout ComfyUI | ||
uses: actions/checkout@v5 | ||
with: | ||
repository: 'comfyanonymous/ComfyUI' | ||
path: 'ComfyUI' | ||
|
||
- name: Install ComfyUI_devtools from frontend repo | ||
shell: bash | ||
run: | | ||
mkdir -p ComfyUI/custom_nodes/ComfyUI_devtools | ||
cp -r ./tools/devtools/* ComfyUI/custom_nodes/ComfyUI_devtools/ | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install Python requirements | ||
shell: bash | ||
working-directory: ComfyUI | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | ||
pip install -r requirements.txt | ||
pip install wait-for-it | ||
- name: Start ComfyUI server | ||
if: ${{ inputs.launch_server == 'true' }} | ||
shell: bash | ||
working-directory: ComfyUI | ||
run: | | ||
python main.py --cpu --multi-user --front-end-root ../dist ${{ inputs.extra_server_params }} & | ||
wait-for-it --service 127.0.0.1:8188 -t 600 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ runs: | |
- name: Detect Playwright version | ||
id: detect-version | ||
shell: bash | ||
working-directory: ComfyUI_frontend | ||
run: | | ||
PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test --json | jq --raw-output '.[0].devDependencies["@playwright/test"].version') | ||
echo "playwright-version=$PLAYWRIGHT_VERSION" >> $GITHUB_OUTPUT | ||
|
@@ -22,10 +21,20 @@ runs: | |
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: pnpm exec playwright install chromium --with-deps | ||
working-directory: ComfyUI_frontend | ||
|
||
- name: Install Playwright Browsers (operating system dependencies) | ||
if: steps.cache-playwright-browsers.outputs.cache-hit == 'true' | ||
shell: bash | ||
run: pnpm exec playwright install-deps | ||
working-directory: ComfyUI_frontend | ||
|
||
- name: Cache tool outputs | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
./.cache | ||
./tsconfig.tsbuildinfo | ||
key: playwright-setup-cache-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }}-${{ hashFiles('./src/**/*.{ts,vue,js}', './*.config.*') }} | ||
|
||
restore-keys: | | ||
playwright-setup-cache-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }}- | ||
playwright-setup-cache-${{ runner.os }}- | ||
playwright-tools-cache-${{ runner.os }}- |
Uh oh!
There was an error while loading. Please reload this page.