infrasynth-backend-kit/.forgejo/workflows/ci.yml
jcv-dev ef95250b7d
All checks were successful
CI / Tests (push) Successful in 59s
CI / Lint (push) Successful in 10s
CI / Type Check (push) Successful in 47s
chore(ci): use uv for Python 3.12 (arm64) instead of actions/setup-python
2026-09-29 18:37:09 -05:00

69 lines
1.7 KiB
YAML

name: CI
# Runs on the Forgejo runner job image (default label image: node:20-bookworm,
# which has node + git). Python 3.12 is provisioned with `uv`, because
# actions/setup-python has no Linux/arm64 builds for 3.12.
on:
push:
branches: [master, main]
tags: ["v*"]
pull_request:
branches: [master, main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Create Python 3.12 venv + install deps
run: |
"$HOME/.local/bin/uv" venv --python 3.12
"$HOME/.local/bin/uv" pip install -e ".[dev]"
- name: Run tests
run: .venv/bin/python -m pytest --cov=infrasynth --cov-report=term-missing -v
env:
DJANGO_SETTINGS_MODULE: config.settings.test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Run ruff
run: '$HOME/.local/bin/uvx ruff check .'
- name: Check formatting
run: '$HOME/.local/bin/uvx ruff format --check infrasynth/ config/ tests/'
typecheck:
name: Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Create Python 3.12 venv + install deps
run: |
"$HOME/.local/bin/uv" venv --python 3.12
"$HOME/.local/bin/uv" pip install -e ".[dev]"
- name: Run mypy
run: .venv/bin/mypy infrasynth/