init playwright workflow #1
Workflow file for this run
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
# Inspired by: https://github.com/Comfy-Org/ComfyUI_frontend/blob/57701f6145f622bf17237410c165966fb4aecc75/.github/workflows/test-browser-exp.yaml | |
name: Update Browser Tests Expectations | |
jobs: | |
browser_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ComfyUI | |
uses: actions/checkout@v4 | |
with: | |
name: comfyanonymous/ComfyUI | |
ref: refs/heads/release | |
path: ComfyUI | |
- name: Checkout BizyAir | |
uses: actions/checkout@v4 | |
with: | |
name: siliconflow/BizyAir | |
ref: master | |
path: ComfyUI/custom_nodes/BizyAir | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20.9.0' | |
- name: Install dependencies | |
run: | | |
pip install -r ComfyUI/requirements.txt | |
pip install -r ComfyUI/custom_nodes/BizyAir/requirements.txt | |
pip install wait-for-it | |
- name: Install playwright | |
run: | | |
npm install | |
npx playwright install chromium --with-deps | |
working-directory: ComfyUI/custom_nodes/BizyAir/browser_tests | |
- name: Copy over test workflows | |
run: | | |
cp -r ComfyUI/custom_nodes/BizyAir/browser_tests/workflows ComfyUI/user/default/workflows | |
- name: Start ComfyUI server | |
run: | | |
python main.py --cpu & | |
wait-for-it --service 127.0.0.1:8188 -t 600 | |
working-directory: ComfyUI | |
- name: Run Playwright tests and update snapshots | |
run: | | |
npx playwright test --update-snapshots --project chromium chromium-2x | |
continue-on-error: true | |
working-directory: ComfyUI/custom_nodes/BizyAir/browser_tests | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: ComfyUI/custom_nodes/BizyAir/browser_tests/playwright-report/ | |
retention-days: 30 | |
- name: Debugging info | |
run: | | |
echo "Branch: ${{ github.head_ref }}" | |
git status | |
working-directory: ComfyUI/custom_nodes/BizyAir/browser_tests | |
- name: Commit updated expectations | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email '[email protected]' | |
git fetch origin ${{ github.head_ref }} | |
git checkout -B ${{ github.head_ref }} origin/${{ github.head_ref }} | |
git add . | |
git commit -m "Update test expectations [skip ci]" | |
git push origin HEAD:${{ github.head_ref }} | |
working-directory: ComfyUI/custom_nodes/BizyAir/browser_tests |