Files
huike-e2e-moicen/.gitea/workflows/playwright-music-room.yml
T
weli fbb6e98cda
music-room Playwright (Gitea Actions) / playwright (push) Failing after 18s
ci: use local git clone instead of actions/checkout
2026-05-03 11:11:05 +08:00

48 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: music-room Playwright (Gitea Actions)
on:
push:
branches: [master, main]
workflow_dispatch:
jobs:
playwright:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: 检出代码(从本地 Gitea
run: |
mkdir -p /workspace
cd /workspace
git clone http://127.0.0.1:3000/weli/huike-e2e-moicen.git .
git config --global --add safe.directory /workspace
- name: 创建 .env.e2e
env:
MOICEN_E2E_UNIONID: ${{ secrets.MOICEN_E2E_UNIONID }}
MOICEN_ADMIN_USER: ${{ secrets.MOICEN_ADMIN_USER }}
MOICEN_ADMIN_PASSWORD: ${{ secrets.MOICEN_ADMIN_PASSWORD }}
MOICEN_HEALTHCHECK_URL: ${{ secrets.MOICEN_HEALTHCHECK_URL }}
run: |
cat > /workspace/.env.e2e <<ENVEOF
MOICEN_E2E_UNIONID=${MOICEN_E2E_UNIONID}
HUIKE_FRONT_BASE_URL=https://music-room.moicen.com
HUIKE_ADMIN_BASE_URL=https://admin.moicen.com
MOICEN_ADMIN_USER=${MOICEN_ADMIN_USER}
MOICEN_ADMIN_PASSWORD=${MOICEN_ADMIN_PASSWORD}
HTYTEACHER_BASE_URL=https://teacher.moicen.com
MOICEN_HEALTHCHECK_URL=${MOICEN_HEALTHCHECK_URL}
ENVEOF
- name: 依赖与 Chromium
working-directory: /workspace
run: |
npm ci
npx playwright install chromium --with-deps
- name: Playwright 测试
working-directory: /workspace
env:
HUIKE_FRONT_BASE_URL: https://music-room.moicen.com
run: npx playwright test