api/.gitlab-ci.yml

64 lines
1.1 KiB
YAML
Raw Normal View History

image: registry.gitlab.com/inetmock/ci-image/go
stages:
- test
- build
- release
test:
stage: test
script:
- task cli-cover-report
2020-12-27 11:16:06 +00:00
artifacts:
reports:
junit: out/report.xml
cobertura: out/coverage.xml
integration-test:
stage: test
services:
- docker:dind
script:
- task integration-test
lint:
stage: test
script:
- golangci-lint run
allow_failure: true
snapshot-release:
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- task snapshot-release
except:
- tags
release:
stage: release
services:
- docker:dind
only:
- tags
variables:
GIT_DEPTH: 0
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- goreleaser release --rm-dist
docs:
stage: release
image: registry.gitlab.com/inetmock/ci-image/mdbook
only:
refs:
- master
- tags
script:
- mdbook build -d ./../public ./docs
artifacts:
paths:
- public