From dd1d92c46795ca8ddee768de94280cf6ec758573 Mon Sep 17 00:00:00 2001 From: Scott-Simmons <52365471+Scott-Simmons@users.noreply.github.com> Date: Fri, 15 Nov 2024 01:01:54 +1100 Subject: [PATCH] Add clean --- Dockerfile.testing | 2 +- Makefile | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile.testing b/Dockerfile.testing index 3ccddaa7..93dd2a7c 100644 --- a/Dockerfile.testing +++ b/Dockerfile.testing @@ -62,5 +62,5 @@ WORKDIR /tsfresh # Requires adding safe.directory so that tsfresh can build when the # repo is mounted. # Note cannot do this at build time as no git directory exists -ENTRYPOINT ["/bin/bash", "-c", "git config --global --add safe.directory /tsfresh && tox -r -p auto"] +ENTRYPOINT ["/bin/bash", "-c", "git config --global --add safe.directory /tsfresh] CMD ["tox", "-r", "-p", "auto"] diff --git a/Makefile b/Makefile index c01a5b7d..9012bbe1 100644 --- a/Makefile +++ b/Makefile @@ -14,25 +14,29 @@ build-testenv: # Tests `PYTHON_VERSIONS`, provided they are also # specified in setup.cfg `envlist` -test-all-testenv: build-testenv +test-all-testenv: clean build-testenv docker run --rm \ --name $(TEST_CONTAINER) \ -v .:$(WORKDIR) \ + # To ensure build artifacts dont conflict with local + -v build_artifacts:$(WORKDIR)/build $(TEST_IMAGE) # Tests the python binaries installed # on local machine, provided they are also # specified in setup.cfg `envlist` -test-all-local: - tox -r +test-all-local: clean + tox -r -p auto # Tests for python version on local machine in # current context (e.g. global or local version of # python set by pyenv, or the python version in # the active virtualenv). -test-local: +test-local: clean pip install .[testing] pytest clean: - rm -rf .tox + rm -rf .tox build/ dist/ *.egg-info + +.PHONY: clean test-all-local test-local test-all-testenv