cafe-plaetschwiesle/.gitlab/test.gitlab-ci.yml
2023-07-05 11:41:13 +02:00

17 lines
512 B
YAML

unit_tests:
rules: !reference [.rules:default, rules]
stage: test
image: golang:$GOLANG_VERSION-alpine
extends:
- .go-cache
script:
- ./scripts/swagger.sh install
- ./scripts/swagger.sh init
- go install gotest.tools/gotestsum@latest
- gotestsum --junitfile report.xml --format testname -- ./... -coverprofile=profile.cov
- go tool cover -func profile.cov
coverage: '/\(statements\)(?:\s+)?(\d+(?:\.\d+)?%)/'
artifacts:
when: always
reports:
junit: report.xml