Files
gplan-2/.github/workflows/tests.yml
T
2026-09-14 18:18:49 +08:00

55 lines
1.6 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
# 注意:本仓库 2026-09-12 尚未初始化 git——本 workflow 在首次 push 到 GitHub 后自动生效。
# 载体 = ADR-0004(双载体):逻辑冒烟 + 场景探针;gdUnit4 deferred(不使用 gdUnit4-action)。
# 外部 wall-clock 超时(timeout 命令)为 ADR-0004 硬性要求——引擎自身无死锁探测。
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 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 --script tests/run_all.gd
# 场景探针(正式工程落地后逐条登记,示例形态):
# - name: Run UI probes
# run: |
# timeout 60s godot --headless --path . res://tests/probes/ui_probe.tscn
# timeout 60s godot --headless --path . res://tests/probes/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