-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (33 loc) · 845 Bytes
/
Makefile
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
MAKEFLAGS += --silent
all: clean lint test build
## help: Prints a list of available build targets.
.PHONY: help
help:
echo "Usage: make <OPTIONS> ... <TARGETS>"
## build: Builds a custom 'k6' with the local extension.
.PHONY: build
build:
xk6 build --with $(shell go list -m)=.
## test: Executes any tests.
.PHONY: test
test:
echo "Running tests..."
go test --shuffle on -race ./...
# lint: Runs the linters.
.PHONY: lint
lint:
echo "Running linters..."
go vet ./...
## clean: Removes any previously created artifacts.
.PHONY: clean
clean:
echo "Cleaning up..."
rm -f ./k6
## run-server: Starts the example server.
.PHONY: run-server
run-server:
docker compose -f examples/server/compose.yaml up -d
## stop-server: Stops the example server.
.PHONY: stop-server
stop-server:
docker compose -f examples/server/compose.yaml down