-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (37 loc) · 970 Bytes
/
Copy pathMakefile
File metadata and controls
46 lines (37 loc) · 970 Bytes
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
34
35
36
37
38
39
40
41
42
43
44
45
46
.PHONY: install test test-all lint upload docs
# Supported test environments as python:django pairs. Keep this explicit so
# unsupported combinations, such as Django 6 on Python < 3.12, are not run.
TEST_MATRIX ?= \
'3.10:4.2.*' \
'3.10:5.2.*' \
'3.11:4.2.*' \
'3.11:5.2.*' \
'3.12:4.2.*' \
'3.12:5.2.*' \
'3.12:6.0.*' \
'3.13:5.2.*' \
'3.13:6.0.*' \
'3.14:5.2.*' \
'3.14:6.0.*'
install:
uv sync --all-groups
test:
uv run --group test pytest
test-all:
@set -e; \
for env in $(TEST_MATRIX); do \
python="$${env%%:*}"; \
django="$${env#*:}"; \
printf '\n==> Python %s / Django %s\n' "$$python" "$$django"; \
uv run --python "$$python" --group test --with "Django==$$django" pytest; \
done
lint:
uv run --group test ruff check
retest:
uv run --group test pytest -vvv --lf
coverage:
uv run --group test pytest --cov=django_postcode_lookup --cov-report=term-missing --cov-report=html
release:
rm -rf dist/*
uv build
twine upload dist/*