From ab4b2653e04010c5a674cdeb9558b1c88579cad6 Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Sat, 17 Oct 2026 04:23:20 +0800 Subject: [PATCH] =?UTF-8?q?chore(ci):=20=E7=A7=BB=E9=99=A4=20.github/workf?= =?UTF-8?q?lows/tests.yml=E2=80=94=E2=80=94=E6=97=A0=E8=BF=9C=E7=AB=AF?= =?UTF-8?q?=E6=97=A0=20CI=20runner=EF=BC=8C=E6=96=87=E6=A1=A3=E5=B7=B2?= =?UTF-8?q?=E6=8C=89=E3=80=8C=E6=97=A0=20CI=E3=80=8D=E5=8F=A3=E5=BE=84?= =?UTF-8?q?=E6=88=90=E6=96=87=EF=BC=8C=E4=B8=8D=E7=95=99=E6=AD=BB=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=882026-10-15=20=E7=94=A8=E6=88=B7=E4=BB=A4?= =?UTF-8?q?=EF=BC=9B2026-10-16=20=E6=97=A2=E8=A3=81=E3=80=8C=E5=88=86?= =?UTF-8?q?=E6=94=AF=E9=87=8D=E5=81=9A=EF=BC=9A=E6=92=A4=20ADR=20=E4=B8=A4?= =?UTF-8?q?=E6=9D=A1=E3=80=81=E5=8F=AA=E4=BF=9D=E7=95=99=E5=88=A0=20.githu?= =?UTF-8?q?b/=E3=80=8D=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/tests.yml | 86 ------------------------------------- 1 file changed, 86 deletions(-) delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 2eaffa9b..00000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: Automated Tests - -# 注意:仓库已初始化 git(尚无远端)——本 workflow 在首次 push 到 GitHub 后自动生效;远端仓库建好后无需改本文件即自动生效。 -# 载体 = 双载体:逻辑冒烟 + 场景探针;gdUnit4 deferred(不使用 gdUnit4-action)。 -# 外部 wall-clock 超时(timeout 命令)为硬性要求——引擎自身无死锁探测。 -# 路径口径:2026-09-27 三层收敛(7f24b640)后工程在 game/——tests 归 game/tests/、探针在 game/smoke/。 -# 轻闸探针口径(2026-10-08 CI 预接线批/迭代19卡③;同日总收口批随用户裁点②甲编入 ui_layout):四探针=ui_input/ui_struct/ui_contrast/ui_layout -# (probe_gate 默认段同款;ui_layout 系卡① T3 断言件、headless resize 实测生效);ui_probe/ui_click/ui_tune/t17_defer/fx 归 --full 重闸不入轻 CI; -# 窗口化四件(shot/fx_shot/board_shot/ui_audit)禁入 headless CI(无渲染面、探针内 fail-fast); -# 判定=timeout 外壳+退出码超时判+PASS 串判定,镜像 probe_gate 判定逻辑的 Linux 形态。 - -on: - push: - branches: [master] - pull_request: - branches: [master] - -jobs: - static-scan: - name: Static scan (S1–S8) - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Run static scan - run: bash game/tests/static_scan.sh - - smoke: - name: Headless smoke (Godot 4.7.2) - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Godot 4.7.2 - # 2026-10-08 尾裁微批c(卡③S1 用户裁甲):nikeee/godot-actions/setup-godot@v2 下载 404 - # (卡③轻 CI 首跑实证:setup 步骤 release 资产拉取失败)——换 chickensoft-games/setup-godot@v2, - # version 参数语义不变(4.7.2)。 - uses: chickensoft-games/setup-godot@v2 - with: - version: 4.7.2 - - # 冷检出导入(.godot 不入 git,fresh checkout 首跑一次性付清;probe_gate 本机经验 1-2 分钟) - - name: Import assets (cold checkout, one-time) - run: timeout 300s godot --headless --path game --import - - # 逻辑冒烟(run_all.gd 内登记套件 manifest) - - name: Run smoke runner (external timeout) - run: timeout 120s godot --headless --path game --script res://tests/run_all.gd - - # 场景探针(轻闸三探针=probe_gate 默认段同款;probe_gate.sh 本体系 Windows 专用 - # 〔PowerShell+taskkill〕CI 不可调用,此处为其判定逻辑的 Linux 独立命令形态: - # 每探针 timeout 外壳 + 退出码超时判〔124/137=挂死〕+ PASS 串判定〔只跑不判=违判定纪律〕; - # 三探针全跑不短路,末尾按汇总退出码定段红绿) - - name: Run scene probes (light-gate trio, timeout + PASS check) - run: | - mkdir -p logs/probe_ci - run_probe() { - name="$1"; scene="$2" - echo "======== $name ========" - st=0 - timeout 120s godot --headless --path game "res://smoke/$scene" >"logs/probe_ci/$name.log" 2>&1 || st=$? - tail -n 20 "logs/probe_ci/$name.log" - if [ "$st" -eq 124 ] || [ "$st" -eq 137 ]; then - echo "[ci-probe] FAIL — $name 超时挂死(exit=$st)"; return 1 - elif ! grep -q "PASS" "logs/probe_ci/$name.log"; then - echo "[ci-probe] FAIL — $name 未见 PASS(exit=$st)"; return 1 - fi - } - rc=0 - run_probe ui_input_probe ui_input_probe.tscn || rc=1 - run_probe ui_struct_probe ui_struct_probe.tscn || rc=1 - run_probe ui_contrast_probe ui_contrast_probe.tscn || rc=1 - run_probe ui_layout_probe ui_layout_probe.tscn || rc=1 - exit $rc - - - name: Upload Test Results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results - path: | - logs/ - reports/ - if-no-files-found: ignore