-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmakefile
More file actions
42 lines (34 loc) · 1.08 KB
/
Copy pathmakefile
File metadata and controls
42 lines (34 loc) · 1.08 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
# Default values for environment variables
DEBUG ?= false
BASE_URL ?= http://localhost:30000
# Pull latest changes from main branch
pull:
git pull origin main
# run test
test:
git pull origin main;
BASE_URL=$(BASE_URL) k6 run test/main.js;
load-test:
git pull origin main;
BASE_URL=$(BASE_URL) LOAD_TEST=true k6 run test/main.js;
# run test
test-debug:
git pull origin main;
BASE_URL=$(BASE_URL) DEBUG=true k6 run test/main.js;
# Pull and run tests in one command
test-debug-log:
git pull origin main;
BASE_URL=$(BASE_URL) DEBUG=true k6 run test/main.js 2>&1 | sed 's/\\"/"/g' &> output.txt;
SCHEMA_DIR = test/schemas
$(SCHEMA_DIR):
mkdir -p $(SCHEMA_DIR)
# Help command to show available targets
help:
@echo "Available commands:"
@echo " make pull - Pull latest changes from main branch"
@echo " make test - Run k6 tests"
@echo " make pull-and-test- Pull changes and run tests"
@echo ""
@echo "Environment variables:"
@echo " DEBUG - Debug mode (default: false)"
@echo " BASE_URL - Base URL for tests (default: http://localhost:3000)"