Files
Owlbot/.gitea/workflows/ci.yml
T
LogalDeveloper 525ead5ba8
Dependency Audit / Dependency Audit (push) Successful in 15s
CI / Formatting (push) Successful in 12s
CI / Linting (push) Successful in 12s
CI / Tests (Python 3.12) (push) Successful in 25s
CI / Tests (Python 3.13) (push) Successful in 24s
CI / Tests (Python 3.14) (push) Successful in 22s
CI / Type Checking (push) Successful in 24s
CI / Spelling (push) Successful in 13s
Added codespell CI job and fixed existing spelling issues.
2026-02-19 14:50:24 -05:00

128 lines
3.4 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
jobs:
formatting:
name: Formatting
runs-on: logaldeveloper-archlinux
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Cache uv packages
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.cache/uv
key: uv-${{ hashFiles('uv.lock') }}
- name: Install dependencies
run: uv sync
- name: Check formatting with Ruff
run: uv run ruff format --check --diff .
linting:
name: Linting
runs-on: logaldeveloper-archlinux
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Cache uv packages
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.cache/uv
key: uv-${{ hashFiles('uv.lock') }}
- name: Install dependencies
run: uv sync
- name: Check linting with Ruff
run: uv run ruff check .
tests:
name: Tests (Python ${{ matrix.python-version }})
runs-on: logaldeveloper-archlinux
strategy:
matrix:
python-version: ["3.12", "3.13", "3.14"]
env:
UV_PYTHON: ${{ matrix.python-version }}
UV_PYTHON_PREFERENCE: system
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Cache uv packages
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.cache/uv
key: uv-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
- name: Cache Owncast binary
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: .owncast-test
key: owncast-${{ hashFiles('tests/conftest.py') }}-${{ runner.os }}-${{ runner.arch }}
- name: Install dependencies
run: uv sync
- name: Run unit tests with Pytest
run: uv run pytest -v --cov --cov-report=
- name: Report code coverage
run: uv run coverage report
type-checking:
name: Type Checking
runs-on: logaldeveloper-archlinux
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Cache uv packages
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.cache/uv
key: uv-${{ hashFiles('uv.lock') }}
- name: Install dependencies
run: uv sync
- name: Check types with Mypy
run: uv run mypy .
spelling:
name: Spelling
runs-on: logaldeveloper-archlinux
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Cache uv packages
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.cache/uv
key: uv-${{ hashFiles('uv.lock') }}
- name: Install dependencies
run: uv sync
- name: Check spelling with codespell
run: uv run codespell