api/.gitlab-ci.yml

45 lines
760 B
YAML

image: registry.gitlab.com/inetmock/ci-image
stages:
- test
- build
- release
test:
stage: test
script:
- task cli-cover-report
artifacts:
reports:
junit: out/report.xml
cobertura: out/coverage.xml
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