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 23 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 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 @@ -95,13 +97,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
39 changes: 21 additions & 18 deletions .github/workflows/update_browser_exp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ name: Update Browser Tests Expectations

on:
workflow_dispatch:
# TODO: more proper trigger

permissions:
contents: write

jobs:
update_browser_expectations:
if: github.event.pull_request.merged || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
# Ref: https://github.com/orgs/community/discussions/25199#discussioncomment-3246802
Expand All @@ -33,9 +36,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 +71,11 @@ jobs:
npm install
working-directory: ComfyUI/custom_nodes/BizyAir/bizyair_frontend

- name: Copy over test workflows
- name: Copy over test setup files
run: |
mkdir -p ComfyUI/user/default
cp -r ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests/workflows ComfyUI/user/default
cp ComfyUI/custom_nodes/BizyAir/bizyair_frontend/browser_tests/api_key.ini ComfyUI/custom_nodes/BizyAir/api_key.ini

- name: Update bizyair_frontend.js
run: |
Expand All @@ -90,30 +91,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
3 changes: 3 additions & 0 deletions browser_tests/api_key.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[auth]
api_key = sk-vzskfwczaazitohtibnocaxlvnrjhgutknmvhmevxxafxcei

Loading
Loading