ci: use local git clone instead of actions/checkout
music-room Playwright (Gitea Actions) / playwright (push) Failing after 18s
music-room Playwright (Gitea Actions) / playwright (push) Failing after 18s
This commit is contained in:
@@ -10,7 +10,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- 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:
|
||||
@@ -19,7 +24,7 @@ jobs:
|
||||
MOICEN_ADMIN_PASSWORD: ${{ secrets.MOICEN_ADMIN_PASSWORD }}
|
||||
MOICEN_HEALTHCHECK_URL: ${{ secrets.MOICEN_HEALTHCHECK_URL }}
|
||||
run: |
|
||||
cat > .env.e2e <<ENVEOF
|
||||
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
|
||||
@@ -30,11 +35,13 @@ jobs:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user