Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (39 loc) · 1.36 KB
/
Copy pathMakefile
File metadata and controls
51 lines (39 loc) · 1.36 KB
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
47
48
49
50
51
.PHONY: all test test-postgres-docker test-mariadb-docker build format check lint clean assets
all: test lint
check: lint
lint:
uv run ruff check
uv run ruff format --check
uv run ty check src
uv run pyrefly check src
uv run mypy src
format:
uv run ruff format
uv run ruff check --fix
uv run ruff format
test:
uv run pytest
## Rebuild the admin console's scripts and styles (src/neozen/admin/static),
## after changing a template's classes or a script; commit the result.
assets:
cd frontend && npm ci && npm run build
# A project name per run, so that several runs on one Docker host don't
# share a database. CI adds compose files through DOCKER_TESTS_EXTRA, and
# runs Compose as a Docker plugin (DOCKER_COMPOSE="docker compose").
DOCKER_COMPOSE ?= docker-compose
DOCKER_TESTS = $(DOCKER_COMPOSE) -p neozen-tests-$$$$ \
-f tests/docker/compose.yaml $(DOCKER_TESTS_EXTRA)
## Run the integration tests against PostgreSQL or MariaDB, all in Docker
test-postgres-docker test-mariadb-docker: test-%-docker:
$(DOCKER_TESTS) run --rm --build tests-$*; status=$$?; \
$(DOCKER_TESTS) down -v; exit $$status
test-cov:
uv run pytest --cov=neozen --cov-report=html --cov-report=term tests
clean:
rm -rf .pytest_cache .ruff_cache dist build __pycache__ .mypy_cache \
.coverage htmlcov .coverage.* *.egg-info
adt clean
build: clean
uv build
publish: build
uv publish