-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cp-org-search
- Loading branch information
Showing
243 changed files
with
39,491 additions
and
7,736 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,30 @@ | ||
.PHONY: test lint cover mock_wire mock_gen | ||
.PHONY: test lint cover mock_wire mock_gen swag | ||
|
||
test: | ||
go test ./... | ||
|
||
lint: | ||
golangci-lint run | ||
|
||
cover: | ||
go test -coverprofile=cover.out -coverpkg=./... ./... | ||
go test -coverprofile=cover.out ./... | ||
go tool cover -html=cover.out -o cover.html | ||
open cover.html | ||
|
||
mock_wire: | ||
@echo "Running wire for component mocks..." | ||
@go run -mod=mod github.com/google/wire/cmd/wire opencsg.com/csghub-server/component | ||
@go run -mod=mod github.com/google/wire/cmd/wire opencsg.com/csghub-server/component/... | ||
@if [ $$? -eq 0 ]; then \ | ||
echo "Renaming wire_gen.go to wire_gen_test.go..."; \ | ||
echo "Renaming component wire_gen.go to wire_gen_test.go..."; \ | ||
mv component/wire_gen.go component/wire_gen_test.go; \ | ||
echo "Renaming component/callback wire_gen.go to wire_gen_test.go..."; \ | ||
mv component/callback/wire_gen.go component/callback/wire_gen_test.go; \ | ||
else \ | ||
echo "Wire failed, skipping renaming."; \ | ||
fi | ||
|
||
mock_gen: | ||
mockery | ||
|
||
swag: | ||
swag init --pd -d cmd/csghub-server/cmd/start,api/router,api/handler,builder/store/database,common/types,accounting/handler,user/handler,component -g server.go |
Oops, something went wrong.