Build with Magefile #104341
6
Makefile
6
Makefile
@ -147,10 +147,8 @@ swagger-ui:
|
|||||||
@echo
|
@echo
|
||||||
@echo 'Now update pkg/api/static/swagger-ui/index.html to have url: "/api/openapi3.json",'
|
@echo 'Now update pkg/api/static/swagger-ui/index.html to have url: "/api/openapi3.json",'
|
||||||
|
|
||||||
test:
|
test: buildtool
|
||||||
# Ensure the web-static directory exists, so that `web/web_app.go` can embed something.
|
"${BUILDTOOL_PATH}" test
|
||||||
mkdir -p ${WEB_STATIC}
|
|
||||||
go test -short -failfast ./...
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@go clean -i -x
|
@go clean -i -x
|
||||||
|
@ -19,7 +19,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Check(ctx context.Context) {
|
func Check(ctx context.Context) {
|
||||||
mg.CtxDeps(ctx, Govulncheck, Staticcheck, Vet)
|
mg.CtxDeps(ctx, Test, Govulncheck, Staticcheck, Vet)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Test(ctx context.Context) error {
|
||||||
|
return sh.RunV(mg.GoCmd(), "test", "-short", "-failfast", "./...")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for known vulnerabilities.
|
// Check for known vulnerabilities.
|
||||||
|
Loading…
Reference in New Issue
Block a user