mirror of
https://github.com/basnijholt/compose-farm.git
synced 2026-03-06 10:52:03 +00:00
- Enable `-n auto` for all test commands in justfile (parallel execution) - Add redis stack to test fixtures (missing stack was causing test failure) - Replace hardcoded timeouts with constants: `TIMEOUT` (10s) and `SHORT_TIMEOUT` (5s) - Rename `test-unit` → `test-cli` and `test-browser` → `test-web` - Skip CLI startup test when running in parallel mode (`-n auto`) - Update test assertions for 5 stacks (was 4)
53 lines
1.2 KiB
Makefile
53 lines
1.2 KiB
Makefile
# Compose Farm Development Commands
|
|
# Run `just` to see available commands
|
|
|
|
# Default: list available commands
|
|
default:
|
|
@just --list
|
|
|
|
# Install development dependencies
|
|
install:
|
|
uv sync --all-extras --dev
|
|
|
|
# Run all tests (parallel)
|
|
test:
|
|
uv run pytest -n auto
|
|
|
|
# Run CLI tests only (parallel, with coverage)
|
|
test-cli:
|
|
uv run pytest -m "not browser" -n auto
|
|
|
|
# Run web UI tests only (parallel)
|
|
test-web:
|
|
uv run pytest -m browser -n auto
|
|
|
|
# Lint, format, and type check
|
|
lint:
|
|
uv run ruff check --fix .
|
|
uv run ruff format .
|
|
uv run mypy src
|
|
uv run ty check src
|
|
|
|
# Start web UI in development mode with auto-reload
|
|
web:
|
|
uv run cf web --reload --port 9001
|
|
|
|
# Kill the web server
|
|
kill-web:
|
|
lsof -ti :9001 | xargs kill -9 2>/dev/null || true
|
|
|
|
# Build docs and serve locally
|
|
doc:
|
|
uvx zensical build
|
|
python -m http.server -d site 9002
|
|
|
|
# Kill the docs server
|
|
kill-doc:
|
|
lsof -ti :9002 | xargs kill -9 2>/dev/null || true
|
|
|
|
# Clean up build artifacts and caches
|
|
clean:
|
|
rm -rf .pytest_cache .mypy_cache .ruff_cache .coverage htmlcov dist build
|
|
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
|
|
find . -type d -name "*.egg-info" -exec rm -rf {} + 2>/dev/null || true
|