Files
gplan-2/.github/workflows/tests.yml
T

56 lines
1.7 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: Automated Tests
# 注意:仓库已初始化 git(尚无远端)——本 workflow 在首次 push 到 GitHub 后自动生效。
# 载体 = ADR-0004(双载体):逻辑冒烟 + 场景探针;gdUnit4 deferred(不使用 gdUnit4-action)。
# 外部 wall-clock 超时(timeout 命令)为 ADR-0004 硬性要求——引擎自身无死锁探测。
# 路径口径:2026-09-27 三层收敛(7f24b640)后工程在 game/——tests 归 game/tests/、探针在 game/smoke/。
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
static-scan:
name: Static scan (ADR-0004 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
uses: nikeee/godot-actions/setup-godot@v2
with:
version: 4.7.2
# 逻辑冒烟(run_all.gd 内登记套件 manifest)
- name: Run smoke runner (external timeout per ADR-0004)
run: timeout 120s godot --headless --path game --script res://tests/run_all.gd
# 场景探针(逐条登记,示例形态):
# - name: Run UI probes
# run: |
# timeout 60s godot --headless --path game res://smoke/ui_probe.tscn
# timeout 60s godot --headless --path game res://smoke/ui_click_probe.tscn
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
logs/
reports/
if-no-files-found: ignore