This commit is contained in:
37
.gitea/workflows/ci.yml
Normal file
37
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
lint-and-build:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Python syntax check
|
||||
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)
|
||||
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
|
||||
if: always()
|
||||
run: rm -rf .venv-ci
|
||||
Reference in New Issue
Block a user