Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (42 loc) · 1.85 KB
/
Copy pathMakefile
File metadata and controls
51 lines (42 loc) · 1.85 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
# AutoBot Makefile — standard entry points for testing and coverage (#3285)
# Requires: pytest, pytest-cov, pytest-asyncio installed in the active venv
# Frontend targets require Node.js 20+ and npm ci run inside autobot-frontend/
.PHONY: test test-coverage test-backend test-frontend test-e2e format format-check help
# Default target: run all backend unit tests without coverage
test: test-backend
## Run backend unit tests with 70% coverage gate
test-coverage:
pytest \
--cov=autobot-backend \
--cov=autobot-slm-backend \
--cov=autobot_shared \
--cov-report=term-missing \
--cov-report=html:reports/coverage-backend \
--cov-report=xml:reports/coverage-backend.xml \
--cov-fail-under=70 \
-m "not integration and not slow and not distributed and not performance"
## Run backend unit tests (no coverage)
test-backend:
pytest \
-m "not integration and not slow and not distributed and not performance"
## Run frontend unit tests with 70% coverage gate
test-frontend:
cd autobot-frontend && npm run test:coverage
## Run Playwright E2E tests (requires running backend+frontend)
test-e2e:
cd autobot-frontend && npm run test:playwright
## Format Python with project-pinned Black + isort settings (#7249)
format:
@bash scripts/format.sh
## Same as `make format` but exits non-zero if anything would change (CI mode)
format-check:
@bash scripts/format.sh --check
## Show this help
help:
@echo "AutoBot targets:"
@echo " make test - backend unit tests (no coverage)"
@echo " make test-coverage - backend tests + coverage gate (>=70%)"
@echo " make test-frontend - frontend vitest coverage (>=70%)"
@echo " make test-e2e - Playwright E2E tests"
@echo " make format - format Python with project Black+isort settings"
@echo " make format-check - check formatting without modifying files (CI)"