docs: 版本概览新增"状态"列 #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python Syntax Check | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| py-compile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - run: python -m py_compile scripts/*.py | |
| doctor: | |
| runs-on: ubuntu-latest | |
| needs: py-compile | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - run: python scripts/doctor.py | |
| gatekeeper-smoke: | |
| runs-on: ubuntu-latest | |
| needs: py-compile | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Smoke test gatekeeper | |
| run: | | |
| python scripts/gatekeeper.py --chapter 1 --stage final > gatekeeper.log 2>&1 || true | |
| cat gatekeeper.log | |
| # Fail CI on real errors (traceback, syntax), but not on business-level FAILED | |
| if grep -q "Traceback\|SyntaxError\|ModuleNotFoundError\|ImportError" gatekeeper.log; then | |
| echo "FATAL: gatekeeper crashed with an exception" | |
| exit 1 | |
| fi | |
| echo "OK: gatekeeper ran without exceptions (business-level result may be PASSED or FAILED)" |