diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3af8f37..ec52ec8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/Taskfile.yml b/Taskfile.yml index bada179..3e438ce 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -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: