Adds ruff as a dev dependency with an explicit py312 E/F rule set, so the gate stays stable across ruff releases. make check now runs uv sync --frozen, ruff, compileall, and pytest; make lint runs ruff alone. The Gitea job splits the same checks into named steps for readable failures and has a 10-minute timeout. No secrets, image push, or cluster access.
42 lines
858 B
YAML
42 lines
858 B
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- "feat/**"
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Check out
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install uv
|
|
run: python -m pip install "uv==0.10.4"
|
|
|
|
# Same checks as local `make check`, split into steps for readable CI
|
|
# failures. No secrets, no image push, no cluster access.
|
|
- name: Sync locked environment
|
|
run: uv sync --frozen
|
|
|
|
- name: Static analysis (ruff)
|
|
run: uv run ruff check src tests main.py
|
|
|
|
- name: Byte-compile
|
|
run: uv run python -m compileall src
|
|
|
|
- name: Tests
|
|
run: uv run pytest -q
|