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:
21
Makefile
Normal file
21
Makefile
Normal 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
|
||||
Reference in New Issue
Block a user