2024-06-24 18:47:28 +00:00
|
|
|
# This is a temporary action during frontend TS migration.
|
|
|
|
# This file should be removed after TS migration is completed.
|
|
|
|
# The browser test is here to ensure TS repo is working the same way as the
|
|
|
|
# current JS code.
|
|
|
|
# If you are adding UI feature, please sync your changes to the TS repo:
|
|
|
|
# huchenlei/ComfyUI_frontend and update test expectation files accordingly.
|
|
|
|
name: Playwright Browser Tests CI
|
|
|
|
|
|
|
|
on:
|
2024-06-26 13:09:21 +00:00
|
|
|
push:
|
|
|
|
branches: [ main, master ]
|
2024-06-24 18:47:28 +00:00
|
|
|
pull_request:
|
|
|
|
branches: [ main, master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout ComfyUI
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: "comfyanonymous/ComfyUI"
|
|
|
|
path: "ComfyUI"
|
|
|
|
- name: Checkout ComfyUI_frontend
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: "huchenlei/ComfyUI_frontend"
|
|
|
|
path: "ComfyUI_frontend"
|
2024-06-26 23:58:56 +00:00
|
|
|
ref: "fcc54d803e5b6a9b08a462a1d94899318c96dcbb"
|
2024-06-24 18:47:28 +00:00
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: lts/*
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.10'
|
|
|
|
- name: Install requirements
|
|
|
|
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
|
|
|
|
working-directory: ComfyUI
|
|
|
|
- name: Start ComfyUI server
|
|
|
|
run: |
|
2024-07-09 21:12:57 +00:00
|
|
|
python main.py --cpu 2>&1 | tee console_output.log &
|
2024-06-24 18:47:28 +00:00
|
|
|
wait-for-it --service 127.0.0.1:8188 -t 600
|
|
|
|
working-directory: ComfyUI
|
|
|
|
- name: Install ComfyUI_frontend dependencies
|
|
|
|
run: |
|
|
|
|
npm ci
|
|
|
|
working-directory: ComfyUI_frontend
|
|
|
|
- name: Install Playwright Browsers
|
|
|
|
run: npx playwright install --with-deps
|
|
|
|
working-directory: ComfyUI_frontend
|
|
|
|
- name: Run Playwright tests
|
|
|
|
run: npx playwright test
|
|
|
|
working-directory: ComfyUI_frontend
|
2024-07-09 21:12:57 +00:00
|
|
|
- name: Check for unhandled exceptions in server log
|
|
|
|
run: |
|
|
|
|
if grep -qE "Exception|Error" console_output.log; then
|
|
|
|
echo "Unhandled exception/error found in server log."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
working-directory: ComfyUI
|
2024-06-24 18:47:28 +00:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
name: playwright-report
|
|
|
|
path: ComfyUI_frontend/playwright-report/
|
|
|
|
retention-days: 30
|
2024-07-09 21:12:57 +00:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
name: console-output
|
|
|
|
path: ComfyUI/console_output.log
|
|
|
|
retention-days: 30
|