From 911a4bc4638fac925bd3f434b95170119647c03d Mon Sep 17 00:00:00 2001 From: currycan Date: Thu, 7 May 2026 06:34:25 +0800 Subject: [PATCH] =?UTF-8?q?ci(ops):=20self-hosted=20runner=20=E7=9C=9F?= =?UTF-8?q?=E6=9C=BA=20E2E=20workflow=20=E6=A1=86=E6=9E=B6=EF=BC=88dry-run?= =?UTF-8?q?=EF=BC=8C=E9=BB=98=E8=AE=A4=E7=A6=81=E7=94=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 .github/workflows/_e2e_dryrun.yml,默认 if: false, 仅 workflow_dispatch 入口存在;步骤含 probe + benchmark + artifact upload - 决策档案 D-003(reference/decisions/,gitignored)评估 4 方案后 接受方案 D 维持手工真机回归,self-hosted 框架预埋但不启用 - ops-runbook 第 6 节新增「self-hosted runner(实验性)」段, 描述启用条件、启用步骤、紧急下线 SOP;原第 6 节顺延至 7 不动 release.yml / test.yml;不暴露任何 secrets Refs reference/06-test-gap-analysis.md 真机 E2E 长期目标 --- .github/workflows/_e2e_dryrun.yml | 55 +++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/_e2e_dryrun.yml diff --git a/.github/workflows/_e2e_dryrun.yml b/.github/workflows/_e2e_dryrun.yml new file mode 100644 index 0000000..0c45cab --- /dev/null +++ b/.github/workflows/_e2e_dryrun.yml @@ -0,0 +1,55 @@ +name: E2E (dry-run, manual only) + +# 实验性 self-hosted runner 真机 E2E 框架。 +# 决策档案:reference/decisions/D-003-self-hosted-runner.md(status=postponed) +# 启用条件:D-003 升级为 accepted 后,把 jobs.e2e.if 改成 true 并配置 self-hosted runner。 +# 当前默认不执行,仅保留 workflow_dispatch 入口供未来手动触发使用。 + +on: + workflow_dispatch: + inputs: + android_device: + description: "目标设备(与 self-hosted runner label 对应)" + required: true + default: "pixel-7" + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + +concurrency: + group: e2e-dryrun-${{ github.ref }} + cancel-in-progress: true + +jobs: + e2e: + name: E2E probe (${{ inputs.android_device }}) + if: false # D-003 = postponed;启用前请阅读 reference/decisions/D-003-self-hosted-runner.md + runs-on: [self-hosted, linux, android] + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install Poetry + run: pip install poetry + + - name: Install dependencies + run: poetry install + + - name: Probe run (read-only) + run: bash mobile/scripts/start_ticket_grabbing.sh --probe --yes + + - name: Hot-path benchmark + run: bash mobile/scripts/benchmark_hot_path.sh --runs 3 + + - name: Upload artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: e2e-artifacts-${{ github.run_id }} + path: tmp/ + retention-days: 7 + if-no-files-found: ignore