From c9730189a77e9ffcaa0444f3fa7b6f3bcd1b3a6b Mon Sep 17 00:00:00 2001 From: Aron Wussler Date: Thu, 9 May 2019 18:51:04 +0200 Subject: [PATCH] Add code coverage to CI --- .gitignore | 3 +++ .gitlab-ci.yml | 13 ++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c0b49e8..81d26e0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ bin dist vendor .vscode +.out +.html +reports diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index edbb362..5eed47a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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