pominal/.gitlab-ci.yml
Dan Anglin 5fd24b80df
test: improve testing suite and added reporting
* replace the table driven test with sub tests.
* create and publish code coverage reports via GitLab pages.
* use JUnit to view test results in the test tab in the pipeline view.
* upgrade Go to version 1.13.6.
2020-01-18 01:04:51 +00:00

40 lines
624 B
YAML

---
stages:
- test
- deploy
variables:
CGO_ENABLED: 0
test:unit:
artifacts:
expire_in: 30 minutes
paths:
- code-coverage.html
reports:
junit:
report.xml
before_script:
- apk add --no-cache make
- go get -u github.com/jstemmer/go-junit-report
image: golang:1.13.6-alpine
script:
- make test_cover_report
stage: test
pages:
artifacts:
paths:
- public
expire_in: 30 days
dependencies:
- test:unit
only:
refs:
- master@dananglin/pominal
script:
- mkdir public
- mv code-coverage.html public
stage: deploy
variables:
GIT_STRATEGY: none