中文+README
All checks were successful
CI / lint-and-build (push) Successful in 8s

This commit is contained in:
2026-06-14 12:08:27 +08:00
parent f9b32208e4
commit 26a5f99587
16 changed files with 376 additions and 80 deletions

View File

@@ -10,28 +10,20 @@ jobs:
lint-and-build:
runs-on: self-hosted
steps:
- name: Checkout
- name: 检出代码
uses: https://gitea.com/actions/checkout@v4
- name: Python syntax check
- name: Python 语法检查
run: |
python3 -m compileall -q collector web main.py
- name: Optional ruff lint
run: |
if command -v ruff >/dev/null 2>&1; then
ruff check collector web main.py || true
else
echo "ruff not installed, skipping"
fi
- name: Build venv (dry-run install)
- name: 构建 venv
run: |
python3 -m venv --system-site-packages .venv-ci
.venv-ci/bin/pip install --upgrade pip
.venv-ci/bin/pip install -r requirements.txt
.venv-ci/bin/python -c "import flask; print('flask', flask.__version__)"
- name: Cleanup
- name: 清理临时 venv
if: always()
run: rm -rf .venv-ci