build before run tests #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ComfyUI | |
uses: actions/checkout@v4 | |
with: | |
repository: "comfyanonymous/ComfyUI" | |
path: "ComfyUI" | |
ref: master | |
- name: Checkout ComfyUI_frontend | |
uses: actions/checkout@v4 | |
with: | |
repository: "huchenlei/ComfyUI_frontend" | |
path: "ComfyUI_frontend" | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- 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: | | |
python main.py --cpu & | |
working-directory: ComfyUI | |
- name: Run UI tests | |
run: | | |
wait-for-it --service 127.0.0.1:8188 -t 600 | |
npm ci | |
npm run build | |
npm run test:generate | |
npm test -- --verbose | |
working-directory: ComfyUI_frontend/tests-ui |