pominal/.gitlab-ci.yml
Dan Anglin 99ebc86270
refactor: add lint test and refactor code.
- lint test using golangci-lint.
- lint test added as a job in the testing stage.
- code refactoring based on feedback.
2020-01-24 09:51:21 +00:00

45 lines
685 B
YAML

---
stages:
- test
- deploy
variables:
CGO_ENABLED: 0
.install-make:
before_script:
- apk add --no-cache make
test:unit:
artifacts:
expire_in: 30 minutes
paths:
- code-coverage.html
extends: .install-make
image: golang:1.13.6-alpine
script:
- make test_cover_report
stage: test
test:lint:
extends: .install-make
image: golangci/golangci-lint:v1.23.1-alpine
script:
- make test_lint
stage: test
pages:
artifacts:
paths:
- public
expire_in: 30 days
dependencies:
- test:unit
only:
- master@dananglin/Pominal
script:
- mkdir public
- mv code-coverage.html public
stage: deploy
variables:
GIT_STRATEGY: none