From 41b2c0eb1aed7c0d4092edcd6f774fcc3e7c08cc Mon Sep 17 00:00:00 2001 From: Till Prochaska <1512805+tillprochaska@users.noreply.github.com> Date: Tue, 21 May 2024 10:15:00 +0200 Subject: [PATCH] Add separate Makefile target to run tests without starting a Docker container --- .github/workflows/build.yml | 2 +- Makefile | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42a55f6..056026c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: run: docker compose run --rm shell make lint - name: Run the tests # Some tests rely on the package being installed - run: docker compose run --rm shell bash -c "make install && make tests" + run: docker compose run --rm shell bash -c "make install && make test-local" - name: Build a distribution run: docker compose run --rm shell python3 setup.py sdist bdist_wheel - name: Publish a Python distribution to PyPI diff --git a/Makefile b/Makefile index 7feaa0d..5f9d692 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,9 @@ dev: python3 -m pip install -q -r requirements-dev.txt test: + docker compose run --rm shell make test-local + +test-local: pytest --cov=servicelayer lint: