generated from PenaSide/GolangTemplate
--
This commit is contained in:
parent
3fe47bb46f
commit
e3da74e8f3
@ -1,33 +1,7 @@
|
|||||||
stages:
|
stages:
|
||||||
- lint
|
|
||||||
- test
|
|
||||||
- clean
|
|
||||||
- build
|
- build
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
lint:
|
|
||||||
image: golangci/golangci-lint:v1.52-alpine
|
|
||||||
stage: lint
|
|
||||||
before_script:
|
|
||||||
- go install github.com/vektra/mockery/v2@v2.26.0
|
|
||||||
- go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.12.4
|
|
||||||
script:
|
|
||||||
- go generate ./internal/...
|
|
||||||
- golangci-lint version
|
|
||||||
- golangci-lint run ./internal/...
|
|
||||||
|
|
||||||
test:
|
|
||||||
image: golang:1.20.3-alpine
|
|
||||||
stage: test
|
|
||||||
coverage: /\(statements\)(?:\s+)?(\d+(?:\.\d+)?%)/
|
|
||||||
script:
|
|
||||||
- CGO_ENABLED=0 go test ./internal/... -coverprofile=coverage.out
|
|
||||||
- go tool cover -html=coverage.out -o coverage.html
|
|
||||||
- go tool cover -func coverage.out
|
|
||||||
artifacts:
|
|
||||||
expire_in: "3 days"
|
|
||||||
paths:
|
|
||||||
- coverage.html
|
|
||||||
|
|
||||||
clean-old:
|
clean-old:
|
||||||
stage: clean
|
stage: clean
|
||||||
|
Loading…
Reference in New Issue
Block a user