Files
Owlbot/.gitea/workflows/test.yml
T
LogalDeveloper 24aa484d7f
Format / ruff (push) Successful in 10s
Lint / ruff (push) Successful in 10s
Unit Tests / pytest (push) Successful in 18s
Type Check / mypy (push) Successful in 18s
Added code coverage reporting with pytest-cov to the test workflow.
2026-02-16 15:25:40 -05:00

37 lines
964 B
YAML

name: Unit Tests
on:
push:
branches: [master]
pull_request:
jobs:
pytest:
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: 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