test: add unit tests and CI workflow for dockreap

- Add unittest-based unit tests for core volume logic
- Add Makefile with isolated venv-based test runner
- Add GitHub Actions CI workflow
- Automatically mark SemVer-tagged commits as stable

https://chatgpt.com/share/695107c4-f320-800f-b4ce-da953de9bb86
This commit is contained in:
Kevin Veen-Birkenbach
2025-12-28 11:34:35 +01:00
parent 33cac347ea
commit 04850a8f20
7 changed files with 133 additions and 0 deletions

21
Makefile Normal file
View File

@@ -0,0 +1,21 @@
.ONESHELL:
SHELL := /bin/bash
.SHELLFLAGS := -euo pipefail -c
VENV ?= .venv
PY := $(VENV)/bin/python
PIP := $(VENV)/bin/pip
.PHONY: venv test clean
venv:
test -x "$(PY)" || python3 -m venv "$(VENV)"
"$(PIP)" install -U pip
"$(PIP)" install -e .
test: venv
"$(PY)" -m unittest discover -s tests/unit -p "test_*.py" -v
clean:
rm -rf "$(VENV)" .pytest_cache .coverage
find . -type d -name "__pycache__" -print0 | xargs -0r rm -rf