-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (26 loc) · 931 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
DOCKER = docker
LIBRARY = backlib
VENV = poetry run
# Docker
docker:
$(DOCKER) build --file ./dev/docker/py39.Dockerfile --tag $(LIBRARY):3.9 .
$(DOCKER) build --file ./dev/docker/py310.Dockerfile --tag $(LIBRARY):3.10 .
$(DOCKER) build --file ./dev/docker/py311.Dockerfile --tag $(LIBRARY):3.11 .
$(DOCKER) build --file ./dev/docker/py312.Dockerfile --tag $(LIBRARY):3.12 .
$(DOCKER) build --file ./dev/docker/py313.Dockerfile --tag $(LIBRARY):3.13 .
# Linters
lint: ruff mypy
mypy:
$(VENV) mypy ./$(LIBRARY)/
ruff:
$(VENV) ruff check ./$(LIBRARY)/
# Tests
test: unit-tests compatibility-tests
unit-tests:
$(VENV) pytest ./tests/
compatibility-tests:
$(DOCKER) run $(LIBRARY):3.9 -B -m pytest ./tests/
$(DOCKER) run $(LIBRARY):3.10 -B -m pytest ./tests/
$(DOCKER) run $(LIBRARY):3.11 -B -m pytest ./tests/
$(DOCKER) run $(LIBRARY):3.12 -B -m pytest ./tests/
$(DOCKER) run $(LIBRARY):3.13 -B -m pytest ./tests/