ci: add ruff + mypy static analysis config and Forgejo workflow
This commit is contained in:
parent
75d3417a2b
commit
2ca3d2f021
2 changed files with 44 additions and 1 deletions
23
.forgejo/workflows/ci-static.yml
Normal file
23
.forgejo/workflows/ci-static.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
name: Static Analysis
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
static:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python
|
||||
run: pip install ruff mypy psycopg2-binary requests fastapi uvicorn python-multipart
|
||||
|
||||
- name: Lint with ruff
|
||||
run: ruff check .
|
||||
|
||||
- name: Type check with mypy
|
||||
run: >
|
||||
mypy
|
||||
ts_shared_rev.py
|
||||
ingest_movement_rev.py
|
||||
ingest_events_rev.py
|
||||
webhook_receiver_rev.py
|
||||
|
|
@ -28,3 +28,23 @@ managed = true
|
|||
|
||||
[tool.uv.sources]
|
||||
# Optional: If you ever have custom local modules or git-based private libs
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"ruff>=0.4",
|
||||
"mypy>=1.10",
|
||||
"pytest>=8",
|
||||
"pytest-asyncio>=0.23",
|
||||
"httpx>=0.27",
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py312"
|
||||
line-length = 100
|
||||
select = ["E", "W", "F", "B", "UP", "SIM"]
|
||||
|
||||
[tool.mypy]
|
||||
python_version = "3.12"
|
||||
warn_return_any = true
|
||||
warn_unused_ignores = true
|
||||
ignore_missing_imports = true
|
||||
Loading…
Reference in a new issue