From 9d8e48d303f3848d849f638294cd0e3dceba55f0 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 16 Jul 2025 12:46:56 +0200 Subject: [PATCH] Added explicit testing during container build. It isn't possible to build the container if it doesn'nt pass the tests. --- Dockerfile | 5 +++++ Makefile | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1cb2c4e8..23a9b594 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,5 +60,10 @@ RUN CMAIS_PATH=$(pkgmgr path cymais) && \ ln -sf "$CMAIS_PATH"/main.py /usr/local/bin/cymais && \ chmod +x /usr/local/bin/cymais +# 10) Run integration tests +RUN CMAIS_PATH=$(pkgmgr path cymais) && \ + cd "$CMAIS_PATH" && \ + make test + ENTRYPOINT ["cymais"] CMD ["--help"] diff --git a/Makefile b/Makefile index 66dbe7af..173696ab 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ tree: @echo Generating Tree python3 main.py build tree -D 2 --no-signal -build: +build: clean @echo "🔧 Generating users defaults → $(USERS_OUT)…" python3 $(USERS_SCRIPT) \ --roles-dir $(ROLES_DIR) \ @@ -56,7 +56,7 @@ build: install: build @echo "⚙️ Install complete." -test: +test: build @echo "🧪 Running Python tests…" python -m unittest discover -s tests @echo "📑 Checking Ansible syntax…"