-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (50 loc) · 1.67 KB
/
Makefile
File metadata and controls
62 lines (50 loc) · 1.67 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
54
55
56
57
58
59
60
61
62
.PHONY: test test-unit test-e2e test-all build clean install lint
# =============================================================================
# Test Targets
# =============================================================================
# This project has 2 types of tests:
# 1. Unit tests (src/*.test.ts except e2e.test.ts) - fast, no external deps
# 2. E2E tests (src/e2e.test.ts) - requires OpenCode, makes real LLM calls
#
# Expected test counts:
# - Unit tests: ~140 tests across 6 files
# - E2E tests: 9 tests
# =============================================================================
# Run unit tests only (excludes E2E) - use this for quick iteration
test: build test-unit
# Run unit tests without rebuild
test-unit:
npm test
# Run ALL E2E tests (requires API keys configured)
# This includes LLM integration tests and the export debug test
# Note: Creates e2e-export.json in project root (can be gitignored)
# Expected: 9 passed
test-e2e: build
OPENCODE_E2E=true OPENCODE_EXPORT_TEST=true npm run test:e2e
# Run ALL tests (unit + E2E)
# This is what CI should run and what "run all tests" means.
# Expected output:
# - First run (npm run test:all): unit tests pass, E2E tests skipped
# - Second run (OPENCODE_E2E=true): all 9 E2E tests pass
test-all: build
npm run test:all
OPENCODE_E2E=true OPENCODE_EXPORT_TEST=true npm run test:e2e
# Build the project
build:
npm run build
# Install dependencies
install:
npm install
# Clean build artifacts
clean:
rm -rf dist e2e-export.json
# Lint the code
lint:
npm run lint
# Release helpers
release-patch:
./scripts/release.sh patch
release-minor:
./scripts/release.sh minor
release-major:
./scripts/release.sh major