Skip to content
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

Update CI #11

Merged
merged 30 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 13 additions & 9 deletions .github/workflows/browser_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: Browser Tests

on:
workflow_dispatch:
push:
branches:
- dev_bbs
# TODO: add master when it's ready
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- 'browser_tests/*snapshots'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
Expand Down Expand Up @@ -77,11 +79,14 @@ jobs:
npm install
working-directory: ComfyUI/custom_nodes/BizyAir/bizyair_frontend

- name: Copy over test workflows
- name: Set up test environment
run: |
mkdir -p ComfyUI/user/default
cp -r ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests/workflows ComfyUI/user/default

python3 ComfyUI/custom_nodes/BizyAir/tests/write_api_ini_file.py
env:
BIZYAIR_KEY: ${{ secrets.BIZYAIR_KEY }}

- name: Update bizyair_frontend.js
run: |
npx vue-tsc -b
Expand All @@ -95,13 +100,12 @@ jobs:
working-directory: ComfyUI

- name: Run Tests
continue-on-error: true
run: |
npx playwright test --project chromium chromium-2x
npx playwright test --project chromium chromium-2x --workers=4
working-directory: ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests

- uses: actions/upload-artifact@v4
if: always()
if: success() || failure()
with:
name: playwright-report
path: ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests/playwright-report/
Expand Down
40 changes: 22 additions & 18 deletions .github/workflows/update_browser_exp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: Update Browser Tests Expectations

on:
workflow_dispatch:
# TODO: more proper trigger

permissions:
contents: write

jobs:
update_browser_expectations:
Expand Down Expand Up @@ -33,9 +35,6 @@ jobs:
uses: actions/checkout@v4
with:
repository: siliconflow/bizyair_frontend
# TODO: update after PR is merged
# TODO2: use master when it's ready
ref: dev_bbs_ci
path: ComfyUI/custom_nodes/BizyAir/bizyair_frontend

- uses: actions/setup-python@v4
Expand Down Expand Up @@ -71,10 +70,13 @@ jobs:
npm install
working-directory: ComfyUI/custom_nodes/BizyAir/bizyair_frontend

- name: Copy over test workflows
- name: Set up test environment
run: |
mkdir -p ComfyUI/user/default
cp -r ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests/workflows ComfyUI/user/default
python3 ComfyUI/custom_nodes/BizyAir/tests/write_api_ini_file.py
env:
BIZYAIR_KEY: ${{ secrets.BIZYAIR_KEY }}

- name: Update bizyair_frontend.js
run: |
Expand All @@ -90,30 +92,32 @@ jobs:

- name: Run Playwright tests and update snapshots
run: |
npx playwright test --update-snapshots --project chromium chromium-2x
continue-on-error: true
npx playwright test --update-snapshots --project chromium chromium-2x --workers=4
working-directory: ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests

- uses: actions/upload-artifact@v4
if: always()
if: success() || failure()
with:
name: playwright-report
path: ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests/playwright-report/
retention-days: 30

- name: Debugging info
if: success()
run: |
git status
working-directory: ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests

# TODO: if need to support PR, refer to https://github.com/Comfy-Org/ComfyUI_frontend/blob/57701f6145f622bf17237410c165966fb4aecc75/.github/workflows/test-browser-exp.yaml
# Using a dedicated branch to update test expectations, because
# master is protected, updated images need to push to that branch and PR to master
# NOTE: PR from github action bot is not enabled so need to manually create a PR
- name: Commit updated expectations
continue-on-error: true
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git fetch
git add .
git commit -m "Update test expectations [skip ci]"
git push
working-directory: ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests
if: success()
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update test expectations [skip ci]"
file_pattern: "*.png"
branch: update_snapshots
skip_fetch: false
skip_checkout: false
repository: ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests
Loading
Loading