From 66cc3d4cefbdffb4aa8ce7cf9fe0ad4042e73366 Mon Sep 17 00:00:00 2001 From: Alex Liang Date: Tue, 7 Jan 2025 09:28:16 +0000 Subject: [PATCH] ci: add ci test directive --- Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Makefile b/Makefile index 15e7a8cd..6fd70d0b 100644 --- a/Makefile +++ b/Makefile @@ -522,6 +522,23 @@ test-unit-python-standalone: ## Run Python unit tests (standalone) .PHONY: test-unit-python-standalone +ci-test-python: ## Run Python unit tests. Assumes the dev image has already been built, AND that bindings have been built and are available at `packages/python` + + @ echo "Running Python unit tests..." + + docker run \ + --rm \ + --volume="$(CURDIR):/app:delegated" \ + --volume="/app/build" \ + --workdir=/app/build \ + $(docker_development_image_repository):$(docker_image_version) \ + /bin/bash -c "python${test_python_version} -m pip install --root-user-action=ignore --target=${test_python_directory} --find-links packages/python open_space_toolkit_${project_name} \ + && python${test_python_version} -m pip install --root-user-action=ignore --target=${test_python_directory} plotly pandas \ + && cd ${test_python_directory}/ostk/$(project_name)/ \ + && python${test_python_version} -m pytest -sv ." + +.PHONY: ci-test-python + test-coverage: ## Run test coverage cpp @ echo "Running coverage tests..."