Skip to content

Commit 37b2acc

Browse files
committed
test: added support for run arg in makefile script
1 parent 89ce241 commit 37b2acc

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ format:
66
test:
77
PARALLEL_CONVEY=false make test-lightspeed
88
test-lightspeed:
9-
go test $(GO_TEST_ARGS) -v --count=1 ./tests/...
9+
go test $(GO_TEST_ARGS) --run=${run} -v --count=1 ./tests/...
1010
test-coverage:
1111
@mkdir -p ./coverage
1212
make test GO_TEST_ARGS="--cover -coverpkg=./cmd/...,./core/...,./plugins/...,./utils/... --coverprofile=./coverage/coverage.out"
@@ -30,9 +30,16 @@ install:
3030
go install github.com/evilmartians/lefthook@v1.11.12
3131
lefthook install
3232
@echo "\033[0;32mLefthook installed and configured successfully.\033[0m"
33+
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
34+
@echo "\033[0;32mGolangCI-Lint installed successfully.\033[0m"
3335
@which npm > /dev/null && \
3436
npm install -g @commitlint/config-conventional@17.6.5 @commitlint/cli@17.6.5 && \
3537
echo "\033[0;32mCommitlint installed successfully.\033[0m" || \
3638
echo "\033[0;31mNode is not installed. Please install Node.js to use commitlint.\033[0m"
3739
go mod tidy
38-
@echo "\033[0;32mGo modules installed successfully.\033[0m"
40+
@echo "\033[0;32mGo modules installed successfully.\033[0m"
41+
tidy:
42+
@echo "\033[0;32mRunning go mod tidy...\033[0m"
43+
@GOPRIVATE="github.com/clubpay*" go mod tidy -v
44+
@echo "\033[0;32mVerifying packages...\033[0m"
45+
@GOPRIVATE="github.com/clubpay*" go mod verify

lefthook.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ pre-commit:
33
commands:
44
format:
55
run: make format && git add .
6+
lint:
7+
run: make lint-fix && git add .
8+
tidy:
9+
run: make tidy && git add .
610

711
commit-msg:
812
commands:

0 commit comments

Comments
 (0)