From 110898b1ed2f9a1be138bb2b2c13d957817ea8f1 Mon Sep 17 00:00:00 2001 From: Alex Liang Date: Fri, 10 Jan 2025 16:19:39 +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 6876ba4..23dc10b 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 bd19a45..96a7c76 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 33512b90313e557e8bf674b81dee40863f68a120 Mon Sep 17 00:00:00 2001 From: Alex Liang Date: Fri, 10 Jan 2025 16:56:35 +0000 Subject: [PATCH 2/2] chore: fix typo, reenable main flow --- .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 23dc10b..6876ba4 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 96a7c76..14efb6f 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..."