Files
MarceloZoeng 26a5f99587
All checks were successful
CI / lint-and-build (push) Successful in 8s
中文+README
2026-06-14 12:08:27 +08:00

30 lines
697 B
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint-and-build:
runs-on: self-hosted
steps:
- name: 检出代码
uses: https://gitea.com/actions/checkout@v4
- name: Python 语法检查
run: |
python3 -m compileall -q collector web main.py
- 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: 清理临时 venv
if: always()
run: rm -rf .venv-ci