Files
huike-e2e-moicen/.github/workflows/playwright-music-room.yml
T
weli c5d054789e feat: Playwright against deployed music-room (shell + optional unionid chain)
No Rust/Compose; GitHub Actions with MOICEN_E2E_UNIONID secret; dotenv .env.e2e; proxy install script.

Made-with: Cursor
2026-04-26 17:01:52 +08:00

53 lines
1.3 KiB
YAML

# 仅 npm + Playwright,不 build Rust / 不 Compose;测已部署 music-room H5。
name: music-room Playwright
on:
push:
branches: [master, main]
pull_request:
workflow_dispatch:
inputs:
base_url:
description: H5 基址(含协议,无末尾斜杠)
required: false
default: "https://music-room.moicen.com"
type: string
schedule:
- cron: "30 6 * * 2"
concurrency:
group: huike-e2e-moicen-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
playwright:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: 解析 H5 基址
run: |
URL="${{ inputs.base_url }}"
if [ -z "$URL" ]; then URL="https://music-room.moicen.com"; fi
echo "HUIKE_FRONT_BASE_URL=$URL" >> "$GITHUB_ENV"
echo "Using HUIKE_FRONT_BASE_URL=$URL"
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: package-lock.json
- name: 依赖与 Chromium
run: |
npm ci
npx playwright install chromium --with-deps
- name: Playwright
env:
MOICEN_E2E_UNIONID: ${{ secrets.MOICEN_E2E_UNIONID }}
run: npx playwright test