-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (35 loc) · 1.02 KB
/
Makefile
File metadata and controls
41 lines (35 loc) · 1.02 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
.PHONY: test test-docker test-e2e install lint help
help:
@echo "Crabcode Makefile"
@echo ""
@echo "Commands:"
@echo " make test Run unit tests"
@echo " make test-docker Run tests in Docker"
@echo " make test-e2e Run end-to-end tests in Docker (full promptfoo-cloud simulation)"
@echo " make install Install crabcode to /usr/local/bin"
@echo " make lint Run shellcheck"
@echo ""
test:
@chmod +x tests/run.sh
@./tests/run.sh
test-docker:
@chmod +x tests/run.sh
@./tests/run.sh --docker
test-e2e:
@echo "Building e2e test container..."
@chmod +x tests/e2e/run_e2e.sh
@docker build -t crabcode-e2e -f tests/e2e/Dockerfile.e2e .
@echo ""
@echo "Running end-to-end tests..."
@docker run --rm crabcode-e2e
install:
@chmod +x src/crabcode
@cp src/crabcode /usr/local/bin/crabcode
@echo "Installed to /usr/local/bin/crabcode"
lint:
@if command -v shellcheck &>/dev/null; then \
shellcheck src/crabcode; \
echo "Lint passed"; \
else \
echo "shellcheck not installed, skipping lint"; \
fi