mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2025-12-27 11:06:35 +00:00
ci: add Makefile-driven CI with unit, integration and e2e tests
- add GitHub Actions CI workflow using Makefile targets exclusively - run unit, integration and e2e tests via `make test` - publish Docker image to GHCR on SemVer tags - force-update `stable` git tag after successful release - add integration test for seed CLI (CSV upsert behavior) - extend Makefile with test-unit and test-integration targets https://chatgpt.com/share/694ee54f-b814-800f-a714-e87563e538b7
This commit is contained in:
17
Makefile
17
Makefile
@@ -1,4 +1,5 @@
|
||||
.PHONY: install build test-e2e
|
||||
.PHONY: install build \
|
||||
test-e2e test test-unit test-integration
|
||||
|
||||
# Default python if no venv is active
|
||||
PY_DEFAULT ?= python3
|
||||
@@ -41,4 +42,16 @@ clean:
|
||||
# - loads the freshly built image into DinD
|
||||
# - runs the unittest suite inside a container that talks to DinD via DOCKER_HOST
|
||||
test-e2e: clean build
|
||||
@bash scripts/test-e2e.sh
|
||||
@bash scripts/test-e2e.sh
|
||||
|
||||
test: test-unit test-integration test-e2e
|
||||
|
||||
test-unit: clean build
|
||||
@echo ">> Running unit tests"
|
||||
@docker run --rm -t $(IMAGE) \
|
||||
sh -lc 'python -m unittest discover -t . -s tests/unit -p "test_*.py" -v'
|
||||
|
||||
test-integration: clean build
|
||||
@echo ">> Running integration tests"
|
||||
@docker run --rm -t $(IMAGE) \
|
||||
sh -lc 'python -m unittest discover -t . -s tests/integration -p "test_*.py" -v'
|
||||
Reference in New Issue
Block a user