Skip to content

feat(models): implement registry_from_base and add release migrations… #170

feat(models): implement registry_from_base and add release migrations…

feat(models): implement registry_from_base and add release migrations… #170

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
jobs:
release_version_guard:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Verify tag matches pyproject version
run: |
python - <<'PY'
from pathlib import Path
import re
import os
ref = os.environ["GITHUB_REF_NAME"] # e.g. v0.9.2
tag = ref[1:] if ref.startswith("v") else ref
pyproject = Path("pyproject.toml").read_text(encoding="utf-8")
m = re.search(r'^version\s*=\s*"([^"]+)"', pyproject, flags=re.M)
if m is None:
raise SystemExit("Could not find version in pyproject.toml")
version = m.group(1)
if version != tag:
raise SystemExit(f"Tag/version mismatch: tag={tag} pyproject={version}")
print(f"Tag/version match: {tag}")
PY
docs_drift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Run docs drift check
run: make docs-drift
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test_control_plane
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv pip install -e ".[dev,asyncpg]" --system
- name: Lint
run: ruff check src/ tests/ examples/
- name: Type check
run: mypy src/
- name: Test
run: pytest --tb=short -q
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: uv pip install -e ".[dev]" --system
- name: Ruff format check
run: ruff format --check src/ tests/ examples/
- name: Ruff lint
run: ruff check src/ tests/ examples/
- name: Pylint
run: pylint src/
- name: Import boundary check
run: lint-imports
- name: OpenAPI spec validation
run: make openapi-check
- name: Pre-commit hooks
run: pre-commit run --all-files
semgrep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: returntocorp/semgrep-action@v1
with:
config: lint/semgrep/governance_invariants.yml