-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (41 loc) · 1.72 KB
/
Makefile
File metadata and controls
53 lines (41 loc) · 1.72 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
52
53
.PHONY: docker-build docker-run compose-up compose-down test test-unit test-integration test-taxonomy test-verbose test-coverage
IMAGE_NAME ?= doc-data-extraction
docker-build:
docker build -f docker/Dockerfile -t $(IMAGE_NAME) .
docker-run: docker-build
docker run --rm -p 8000:8000 $(IMAGE_NAME)
compose-up:
docker compose up --build
compose-down:
docker compose down
# Test targets
test:
@echo "Running all tests in Docker container..."
docker compose exec web pytest tests/ -v
test-unit:
@echo "Running unit tests in Docker container..."
docker compose exec web pytest tests/unit/ -v -m unit
test-integration:
@echo "Running integration tests in Docker container..."
docker compose exec web pytest tests/integration/ -v -m integration
test-taxonomy:
@echo "Running taxonomy refactoring tests in Docker container..."
docker compose exec web pytest tests/ -v -m taxonomy
test-verbose:
@echo "Running all tests with verbose output..."
docker compose exec web pytest tests/ -vv -s
test-coverage:
@echo "Running tests with coverage report..."
docker compose exec web pytest tests/ --cov=app --cov-report=html --cov-report=term
help:
@echo "Available targets:"
@echo " docker-build - Build Docker image"
@echo " docker-run - Build and run Docker container"
@echo " compose-up - Start services with docker-compose"
@echo " compose-down - Stop services"
@echo " test - Run all tests"
@echo " test-unit - Run only unit tests"
@echo " test-integration - Run only integration tests"
@echo " test-taxonomy - Run taxonomy refactoring tests"
@echo " test-verbose - Run tests with verbose output"
@echo " test-coverage - Run tests with coverage report"