Add code coverage to CI
This commit is contained in:
parent
fd27ec08fb
commit
c9730189a7
2 changed files with 15 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -3,3 +3,6 @@ bin
|
|||
dist
|
||||
vendor
|
||||
.vscode
|
||||
.out
|
||||
.html
|
||||
reports
|
||||
|
|
|
|||
|
|
@ -19,4 +19,15 @@ test-all:
|
|||
stage: test
|
||||
image: gitlab.protontech.ch:4567/protonmail/import-export/linux
|
||||
script:
|
||||
- go test ./...
|
||||
- go test -coverprofile cover.out ./...
|
||||
- mkdir reports
|
||||
- go tool cover -html=cover.out -o reports/cover.html
|
||||
tags:
|
||||
- coverage
|
||||
artifacts:
|
||||
paths:
|
||||
- reports
|
||||
reports:
|
||||
junit: reports/cover.html
|
||||
when: always
|
||||
expire_in: 5 days
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue