From 725f79bc33b7a56b7a4eeb002541092e8c806956 Mon Sep 17 00:00:00 2001 From: Alex Liang Date: Fri, 10 Jan 2025 16:23:27 +0000 Subject: [PATCH 1/2] build: test matrix --- .github/workflows/build-test.yml | 2 +- Makefile | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 187b15d2..f3ecd4a1 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -55,7 +55,7 @@ jobs: needs: - prepare-environment - build-development-image - uses: open-space-collective/open-space-toolkit/.github/workflows/test.yml@main + uses: open-space-collective/open-space-toolkit/.github/workflows/test.yml@users/alexliang/test-matrix # TBM: demo purposes only with: project_name: ${{ needs.prepare-environment.outputs.project_name }} project_version: ${{ needs.prepare-environment.outputs.project_version }} diff --git a/Makefile b/Makefile index c7766e73..ce8cfc14 100644 --- a/Makefile +++ b/Makefile @@ -542,6 +542,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 avaliable 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 42d6f75e2d8da0733c866ef76f1660ddbcd1f106 Mon Sep 17 00:00:00 2001 From: Alex Liang Date: Fri, 10 Jan 2025 21:48:24 +0000 Subject: [PATCH 2/2] chore: fix typo, reenable main workflow --- .github/workflows/build-test.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f3ecd4a1..187b15d2 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -55,7 +55,7 @@ jobs: needs: - prepare-environment - build-development-image - uses: open-space-collective/open-space-toolkit/.github/workflows/test.yml@users/alexliang/test-matrix # TBM: demo purposes only + uses: open-space-collective/open-space-toolkit/.github/workflows/test.yml@main with: project_name: ${{ needs.prepare-environment.outputs.project_name }} project_version: ${{ needs.prepare-environment.outputs.project_version }} diff --git a/Makefile b/Makefile index ce8cfc14..de9fd4e2 100644 --- a/Makefile +++ b/Makefile @@ -542,7 +542,7 @@ 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 avaliable at `packages/python` +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..."