From 835a5da3c34fdefeed8fa70cda37ac6fd935c73a Mon Sep 17 00:00:00 2001 From: Jarkko Jaakola Date: Wed, 25 Sep 2024 14:34:25 +0300 Subject: [PATCH] chore: install target to use editable install in GH tests --- .github/workflows/tests.yml | 2 +- GNUmakefile | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 22de057af..823f2c9c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: cache: pip python-version: ${{ matrix.python-version }} - - run: make install + - run: make install-dev - run: make unit-tests env: COVERAGE_FILE: ".coverage.${{ matrix.python-version }}" diff --git a/GNUmakefile b/GNUmakefile index 522e481e1..2ee86361d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -42,16 +42,29 @@ venv/.make: .PHONY: install install: venv/.deps -venv/.deps: requirements/requirements-dev.txt requirements/requirements.txt | venv/.make +venv/.deps: venv/.make set +x source ./bin/get-java source ./bin/get-protoc source ./bin/get-snappy set -x - $(PIP) install --use-pep517 . .[dev] + $(PIP) install --use-pep517 . $(PIP) check touch '$(@)' +.PHONY: install-dev +install-dev: venv/.deps-dev +venv/.deps-dev: venv/.make + set +x + source ./bin/get-java + source ./bin/get-protoc + source ./bin/get-snappy + set -x + $(PIP) install -e .[dev] + $(PIP) check + touch '$(@)' + + .PHONY: test tests: unit-tests integration-tests @@ -82,7 +95,7 @@ cleanest: cleaner rm -fr '$(VENV_DIR)' .PHONY: requirements -requirements: export CUSTOM_COMPILE_COMMAND='make requirements' +requirements: requirements: $(PIP) install --upgrade pip setuptools pip-tools $(PIP) install .[dev,typing]