Fix web push delivery handling and worker console
Some checks failed
docker-images / resolve-build-targets (push) Successful in 5s
docker-images / build-and-push (admin) (push) Successful in 30s
docker-images / submit-indexnow (push) Has been cancelled
docker-images / build-and-push (frontend) (push) Has been cancelled
docker-images / build-and-push (backend) (push) Has been cancelled
Some checks failed
docker-images / resolve-build-targets (push) Successful in 5s
docker-images / build-and-push (admin) (push) Successful in 30s
docker-images / submit-indexnow (push) Has been cancelled
docker-images / build-and-push (frontend) (push) Has been cancelled
docker-images / build-and-push (backend) (push) Has been cancelled
This commit is contained in:
@@ -1,21 +1,6 @@
|
||||
name: ui-regression
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- admin/**
|
||||
- frontend/**
|
||||
- playwright-smoke/**
|
||||
- .gitea/workflows/ui-regression.yml
|
||||
pull_request:
|
||||
paths:
|
||||
- admin/**
|
||||
- frontend/**
|
||||
- playwright-smoke/**
|
||||
- .gitea/workflows/ui-regression.yml
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -35,6 +20,11 @@ jobs:
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
cache-dependency-path: |
|
||||
frontend/pnpm-lock.yaml
|
||||
admin/pnpm-lock.yaml
|
||||
playwright-smoke/pnpm-lock.yaml
|
||||
|
||||
- name: Install frontend deps
|
||||
working-directory: frontend
|
||||
@@ -48,7 +38,15 @@ jobs:
|
||||
working-directory: playwright-smoke
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Cache Playwright browsers
|
||||
id: playwright-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/ms-playwright
|
||||
key: ${{ runner.os }}-playwright-chromium-${{ hashFiles('playwright-smoke/pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install Playwright browsers
|
||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||
working-directory: playwright-smoke
|
||||
run: pnpm exec playwright install --with-deps chromium
|
||||
|
||||
@@ -69,71 +67,22 @@ jobs:
|
||||
VITE_FRONTEND_BASE_URL: http://127.0.0.1:4321
|
||||
run: pnpm build
|
||||
|
||||
- name: Prepare Playwright artifact folders
|
||||
run: |
|
||||
rm -rf playwright-smoke/.artifacts
|
||||
mkdir -p playwright-smoke/.artifacts/frontend
|
||||
mkdir -p playwright-smoke/.artifacts/admin
|
||||
|
||||
- name: Run frontend UI regression suite
|
||||
id: ui_frontend
|
||||
working-directory: playwright-smoke
|
||||
continue-on-error: true
|
||||
env:
|
||||
PLAYWRIGHT_USE_BUILT_APP: '1'
|
||||
PLAYWRIGHT_USE_BUILT_APP: "1"
|
||||
run: pnpm test:frontend
|
||||
|
||||
- name: Collect frontend Playwright artifacts
|
||||
if: always()
|
||||
run: |
|
||||
if [ -d playwright-smoke/playwright-report ]; then
|
||||
cp -R playwright-smoke/playwright-report playwright-smoke/.artifacts/frontend/playwright-report
|
||||
fi
|
||||
if [ -d playwright-smoke/test-results ]; then
|
||||
cp -R playwright-smoke/test-results playwright-smoke/.artifacts/frontend/test-results
|
||||
fi
|
||||
rm -rf playwright-smoke/playwright-report playwright-smoke/test-results
|
||||
|
||||
- name: Run admin UI regression suite
|
||||
id: ui_admin
|
||||
working-directory: playwright-smoke
|
||||
continue-on-error: true
|
||||
env:
|
||||
PLAYWRIGHT_USE_BUILT_APP: '1'
|
||||
PLAYWRIGHT_USE_BUILT_APP: "1"
|
||||
run: pnpm test:admin
|
||||
|
||||
- name: Collect admin Playwright artifacts
|
||||
if: always()
|
||||
run: |
|
||||
if [ -d playwright-smoke/playwright-report ]; then
|
||||
cp -R playwright-smoke/playwright-report playwright-smoke/.artifacts/admin/playwright-report
|
||||
fi
|
||||
if [ -d playwright-smoke/test-results ]; then
|
||||
cp -R playwright-smoke/test-results playwright-smoke/.artifacts/admin/test-results
|
||||
fi
|
||||
|
||||
- name: Summarize Playwright artifact paths
|
||||
if: always()
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
echo "Gitea Actions 当前不支持 actions/upload-artifact@v4,改为直接输出产物目录:"
|
||||
|
||||
for path in \
|
||||
"playwright-smoke/.artifacts/frontend/playwright-report" \
|
||||
"playwright-smoke/.artifacts/frontend/test-results" \
|
||||
"playwright-smoke/.artifacts/admin/playwright-report" \
|
||||
"playwright-smoke/.artifacts/admin/test-results"
|
||||
do
|
||||
if [ -d "${path}" ]; then
|
||||
echo "- ${path}"
|
||||
find "${path}" -maxdepth 2 -type f | sort | head -n 20
|
||||
else
|
||||
echo "- ${path} (missing)"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Mark workflow failed when any suite failed
|
||||
if: steps.ui_frontend.outcome != 'success' || steps.ui_admin.outcome != 'success'
|
||||
run: exit 1
|
||||
|
||||
Reference in New Issue
Block a user