diff --git a/.github/workflows/python_build.yml b/.github/workflows/python_build.yml index 1c7bd3a327..890a8e8f6c 100644 --- a/.github/workflows/python_build.yml +++ b/.github/workflows/python_build.yml @@ -57,15 +57,21 @@ jobs: - name: Build and install deltalake run: | - # disable manylinux audit checks for test builds - make install MATURIN_EXTRA_ARGS="--manylinux off" + pip install virtualenv + virtualenv venv + source venv/bin/activate + make develop - name: Run tests - run: make unit-test + run: | + source venv/bin/activate + make unit-test # - name: Run Integration tests # run: | # py.test --cov tests -m integration - name: Build Sphinx documentation - run: make build-documentation + run: | + source venv/bin/activate + make build-documentation diff --git a/python/Makefile b/python/Makefile index 36d0fa7b80..6bfc93b53e 100644 --- a/python/Makefile +++ b/python/Makefile @@ -59,7 +59,7 @@ check-python: ## Run check on Python .PHONY: unit-test unit-test: ## Run unit test $(info --- Run Python unit-test ---) - py.test --cov tests -m 'not integration' + python -m pytest .PHONY: build-documentation build-documentation: ## Build documentation with Sphinx diff --git a/python/pyproject.toml b/python/pyproject.toml index 839b4a1fd8..964538bf7d 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -66,4 +66,10 @@ src_paths = ["deltalake", "tests"] [tool.black] include = '\.pyi?$' -exclude = "venv" \ No newline at end of file +exclude = "venv" + +[tool.pytest.ini_options] +addopts = "--cov=deltalake -v -m 'not integration'" +testpaths = [ + "tests", +] \ No newline at end of file