22 lines
No EOL
641 B
YAML
22 lines
No EOL
641 B
YAML
check-format:
|
|
image: golang:latest
|
|
stage: test
|
|
before_script:
|
|
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
|
|
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
|
|
- cd $GOPATH/src/$REPO_NAME
|
|
script:
|
|
- go fmt $(go list ./... | grep -v /vendor/)
|
|
- go vet $(go list ./... | grep -v /vendor/)
|
|
- go test -race $(go list ./... | grep -v /vendor/)
|
|
|
|
check-gosec:
|
|
image: golang:latest
|
|
before_script:
|
|
- mkdir -p $GOPATH/src/$(dirname $REPO_NAME)
|
|
- ln -svf $CI_PROJECT_DIR $GOPATH/src/$REPO_NAME
|
|
- cd $GOPATH/src/$REPO_NAME
|
|
script:
|
|
- go install github.com/securego/gosec/v2/cmd/gosec@latest
|
|
- go get -v -d .
|
|
- gosec ./... |