Add test and coverage reports
This commit is contained in:
parent
81c4be6343
commit
eaddf264ce
2 changed files with 6 additions and 1 deletions
|
@ -9,6 +9,10 @@ test:
|
|||
stage: test
|
||||
script:
|
||||
- task cli-cover-report
|
||||
artifacts:
|
||||
reports:
|
||||
junit: out/report.xml
|
||||
cobertura: out/coverage.xml
|
||||
|
||||
lint:
|
||||
stage: test
|
||||
|
|
|
@ -46,8 +46,9 @@ tasks:
|
|||
- generate
|
||||
cmds:
|
||||
- mkdir -p {{ .OUT_DIR }}
|
||||
- go test -coverprofile={{ .OUT_DIR }}/cov-raw.out -v ./...
|
||||
- go test -coverprofile={{ .OUT_DIR }}/cov-raw.out -covermode count -v ./... 2>&1 | go-junit-report > {{ .OUT_DIR }}/report.xml
|
||||
- grep -v "generated" {{ .OUT_DIR }}/cov-raw.out > {{ .OUT_DIR }}/cov.out
|
||||
- gocover-cobertura < {{ .OUT_DIR }}/cov.out > {{ .OUT_DIR }}/coverage.xml
|
||||
- rm -f {{ .OUT_DIR }}/cov-raw.out
|
||||
|
||||
cli-cover-report:
|
||||
|
|
Loading…
Reference in a new issue