Add portal browser testing and QA issue automation
Test, build, and deploy ComfyUI Jobs / test-build (push) Successful in 4m41s
Test, build, and deploy ComfyUI Jobs / deploy (push) Successful in 14s
Test, build, and deploy ComfyUI Jobs / browser-test (push) Failing after 7m5s
Test, build, and deploy ComfyUI Jobs / qa-gate (push) Failing after 4s

This commit is contained in:
2026-10-26 14:16:26 +00:00
parent 362f2c9d56
commit 96be6412a8
6 changed files with 285 additions and 1 deletions
+76
View File
@@ -130,3 +130,79 @@ jobs:
"
for attempt in 1 2 3 4 5 6; do curl --fail --silent --show-error --max-time 15 "$HEALTH_URL/api/health" && exit 0 || sleep 5; done
exit 1
browser-test:
if: ${{ gitea.event_name == 'push' && (gitea.ref == 'refs/heads/develop' || gitea.ref == 'refs/heads/qa') }}
needs: deploy
timeout-minutes: 35
runs-on: docker
env:
PLAYWRIGHT_BROWSERS_PATH: .playwright-browsers
steps:
- name: Checkout
uses: actions/checkout@v4
with:
github-server-url: https://git.dumas.ddns.net
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: Resolve browser test target
shell: bash
env:
GITEA_REF: ${{ gitea.ref }}
run: |
set -Eeuo pipefail
case "$GITEA_REF" in
refs/heads/develop) echo "E2E_BASE_URL=http://192.168.1.15:7002" >> "$GITHUB_ENV"; echo "E2E_ENVIRONMENT=dev" >> "$GITHUB_ENV" ;;
refs/heads/qa) echo "E2E_BASE_URL=http://192.168.1.15:6002" >> "$GITHUB_ENV"; echo "E2E_ENVIRONMENT=qa" >> "$GITHUB_ENV" ;;
*) echo "Unexpected browser-test ref: $GITEA_REF"; exit 1 ;;
esac
if [ -z "${{ secrets.COMFYUI_PORTAL_E2E_USERNAME }}" ] || [ -z "${{ secrets.COMFYUI_PORTAL_E2E_PASSWORD }}" ]; then
echo "COMFYUI_PORTAL_E2E_USERNAME and COMFYUI_PORTAL_E2E_PASSWORD must be configured before browser tests can run."
exit 1
fi
- name: Run browser tests against selected environment
id: browser
continue-on-error: true
env:
E2E_USERNAME: ${{ secrets.COMFYUI_PORTAL_E2E_USERNAME }}
E2E_PASSWORD: ${{ secrets.COMFYUI_PORTAL_E2E_PASSWORD }}
run: |
set +e
timeout --signal=TERM --kill-after=30s 30m npm run test:playwright
status=$?
exit "$status"
- name: Track browser failures in Gitea
if: always()
env:
GITEA_API_TOKEN: ${{ secrets.COMFYUI_PORTAL_ISSUE_TOKEN }}
GITEA_REPOSITORY: ${{ gitea.repository }}
GITEA_RUN_ID: ${{ gitea.run_id }}
GITEA_SHA: ${{ gitea.sha }}
E2E_ENVIRONMENT: ${{ gitea.ref == 'refs/heads/qa' && 'qa' || 'dev' }}
BROWSER_TEST_OUTCOME: ${{ steps.browser.outcome }}
run: npm run qa:report
- name: Fail browser job when tests fail
if: ${{ steps.browser.outcome == 'failure' }}
run: exit 1
qa-gate:
if: ${{ always() && (gitea.event_name == 'push' || gitea.event_name == 'pull_request') }}
needs: [test-build, deploy, browser-test]
timeout-minutes: 5
runs-on: docker
steps:
- name: Checkout
uses: actions/checkout@v4
with:
github-server-url: https://git.dumas.ddns.net
- name: Check automated QA blockers
env:
GITEA_API_TOKEN: ${{ secrets.COMFYUI_PORTAL_ISSUE_TOKEN }}
GITEA_REPOSITORY: ${{ gitea.repository }}
run: npm run qa:gate