From e35b36c5052256f920dfb84cfef833cba393197b Mon Sep 17 00:00:00 2001 From: Alex Liang Date: Tue, 7 Jan 2025 09:28:16 +0000 Subject: [PATCH 1/3] 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..." From c34a266fd5cb5877269793c39baf6ebd18840ca1 Mon Sep 17 00:00:00 2001 From: Alex Liang Date: Mon, 13 Jan 2025 17:25:19 +0000 Subject: [PATCH 2/3] tmp: test artifact name fix --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 64f9fea7..c11e22fd 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -67,7 +67,7 @@ jobs: - prepare-environment - build-development-image - test - uses: open-space-collective/open-space-toolkit/.github/workflows/build-packages.yml@main + uses: open-space-collective/open-space-toolkit/.github/workflows/build-packages.yml@fix/artifact-names with: project_name: ${{ needs.prepare-environment.outputs.project_name }} project_version: ${{ needs.prepare-environment.outputs.project_version }} From bcf8cc87bd2ce1bedcec71f16e09d9f3e712713e Mon Sep 17 00:00:00 2001 From: Vishwa Shah Date: Mon, 13 Jan 2025 13:49:37 -0600 Subject: [PATCH 3/3] Apply suggestions from code review --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index c11e22fd..64f9fea7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -67,7 +67,7 @@ jobs: - prepare-environment - build-development-image - test - uses: open-space-collective/open-space-toolkit/.github/workflows/build-packages.yml@fix/artifact-names + uses: open-space-collective/open-space-toolkit/.github/workflows/build-packages.yml@main with: project_name: ${{ needs.prepare-environment.outputs.project_name }} project_version: ${{ needs.prepare-environment.outputs.project_version }}