Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (40 loc) · 1.62 KB
/
Copy pathMakefile
File metadata and controls
54 lines (40 loc) · 1.62 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
.PHONY: build dev dev-core dev-studio air studio test test-unit test-browser test-recording-browser test-recording-replay clean
AIR_VERSION ?= v1.67.3
TOOLS_DIR := $(CURDIR)/.tools
AIR_BIN := $(TOOLS_DIR)/air
$(AIR_BIN):
@mkdir -p $(TOOLS_DIR)
GOBIN="$(TOOLS_DIR)" go install github.com/air-verse/air@$(AIR_VERSION)
air: $(AIR_BIN)
dev: $(AIR_BIN)
@if [ ! -d studio/node_modules ]; then cd studio && npm install; fi
cd studio && AIR_BIN="$(AIR_BIN)" npm run dev:all
dev-core: $(AIR_BIN)
$(AIR_BIN) -c .air.toml
dev-studio:
@if [ ! -d studio/node_modules ]; then cd studio && npm install; fi
cd studio && npm run dev
build:
mkdir -p bin
go build -o bin/browserweave ./cmd/browserweave
studio:
cd studio && npm install && npm run build
test:
go test ./...
cd studio && npm run typecheck
cd studio && npm run test:unit
test-unit:
go test ./core/behavior ./core/engine ./core/hook ./core/workflow
test-browser:
go test ./core/browser/chrome -run TestChromeJSLocatorCDPInputAndNetwork -v
# Attach-only live recorder smoke test. The caller owns the browser process and
# explicitly supplies its CDP endpoint; this target never launches a browser.
test-recording-browser:
@test -n "$(BROWSERWEAVE_TEST_CDP_URL)" || (echo "BROWSERWEAVE_TEST_CDP_URL is required" && exit 2)
BROWSERWEAVE_TEST_CDP_URL="$(BROWSERWEAVE_TEST_CDP_URL)" go test ./core/recorder -run TestRecorderCapturesRealBrowserDOMEvents -count=1 -v
test-recording-replay:
go test ./core/engine -run TestRecordedActionCorpusCompilesAndReplays -count=1
go test ./core/workflow -run TestShippedExampleCorpusCompiles -count=1
cd studio && npm run test:unit
clean:
go clean