-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (35 loc) · 1.12 KB
/
Copy pathMakefile
File metadata and controls
42 lines (35 loc) · 1.12 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
.PHONY: all lint test yaegi_test vendor clean
# Default target: runs lint and standard tests
default: lint test
# Lint the code
lint:
@echo "==> Linting code..."
golangci-lint run
# Run standard Go tests
test:
@echo "==> Running standard Go tests..."
go test -v -cover ./...
# Run tests with Yaegi
# This assumes your plugin's .traefik.yml is in the root and tests are in *_test.go files.
# Yaegi needs to interpret the plugin configuration and the test files.
yaegi_test:
@echo "==> Running tests with Yaegi..."
yaegi test -v .
# The 'vendor' directory contains project dependencies managed by Go modules.
vendor:
@echo "==> Creating vendor directory..."
go mod vendor
# Clean up (optional)
clean:
@echo "==> Cleaning up..."
go clean
rm -rf ./vendor
# Help target (optional)
help:
@echo "Available targets:"
@echo " all : Run lint and standard tests (default)"
@echo " lint : Lint the Go code"
@echo " test : Run standard Go tests"
@echo " yaegi_test : Run tests with Yaegi"
@echo " vendor : Create vendor directory with dependencies"
@echo " clean : Clean up build artifacts"