diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-12 21:59:23 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-12 21:59:23 +0200 |
commit | 7426d68a9ff7f0072b498fe81278037943440d5e (patch) | |
tree | a0180cb0027ed9bf32b8d75e0039c678e974d5e3 /Makefile | |
parent | test: no need to pre-configure git, remove some warnings (diff) | |
download | cgitize-7426d68a9ff7f0072b498fe81278037943440d5e.tar.gz cgitize-7426d68a9ff7f0072b498fe81278037943440d5e.zip |
Makefile: add shortcuts for integration tests
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 21 insertions, 11 deletions
@@ -92,6 +92,7 @@ buildx/push: . venv_dir := .venv +venv_activate := . '$(call escape,$(venv_dir)/bin/activate)' .PHONY: venv/reset venv/reset: @@ -101,33 +102,42 @@ venv/reset: .PHONY: venv venv: venv/reset - . '$(call escape,$(venv_dir))/bin/activate' && pip install -q -r requirements.txt + $(venv_activate) && pip install -q -r requirements.txt # Is there a better way? .PHONY: venv/upgrade venv/upgrade: venv/reset - . '$(call escape,$(venv_dir))/bin/activate' \ + $(venv_activate) \ && pip install -q . \ && pip uninstall -q --yes '$(call escape,$(PROJECT))' \ && pip freeze > requirements.txt -.PHONY: py -py: python +.PHONY: python +python: + $(venv_activate) && python .PHONY: repl repl: python -.PHONY: python -python: - . '$(call escape,$(venv_dir))/bin/activate' && python +.PHONY: test/unit +test/unit: + python -m unittest --verbose --buffer + +.PHONY: test/local +test/local: + ./test/integration/local/test.sh + +.PHONY: test/docker +test/docker: + ./test/integration/docker/test.sh -.PHONY: test -test: - . '$(call escape,$(venv_dir))/bin/activate' && python -m unittest --verbose --buffer +.PHONY: test/example +test/example: + ./test/integration/example/test.sh .PHONY: tag tag: - . '$(call escape,$(venv_dir))/bin/activate' \ + $(venv_activate) \ && pip install -q --upgrade setuptools-scm \ && version="$$( python -m setuptools_scm --strip-dev )" \ && git tag "v$$version" |