diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .gitlab-ci.yml | 3 | ||||
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | README.md | 4 |
4 files changed, 13 insertions, 4 deletions
@@ -1,4 +1,5 @@ config.yml +cover.out tmp/* .idea *.log diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d54fa1c..cc5aff5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,6 +57,9 @@ go:1.13: go:1.14: extends: .test image: golang:1.14 + after_script: + - make coverage + coverage: '/\d+.\d+%/' race: extends: .test @@ -1,4 +1,4 @@ -.PHONY: validate verify verify_ruby verify_golang test test_ruby test_golang setup _install build compile check clean +.PHONY: validate verify verify_ruby verify_golang test test_ruby test_golang coverage coverage_golang setup _install build compile check clean GO_SOURCES := $(shell find . -name '*.go') @@ -19,11 +19,16 @@ test_ruby: bundle exec rspec --color --format d spec test_golang: - go test ./... + go test -cover -coverprofile=cover.out ./... test_golang_race: go test -race ./... +coverage: coverage_golang + +coverage_golang: + [ -f cover.out ] && go tool cover -func cover.out + setup: _install bin/gitlab-shell _install: @@ -39,8 +39,8 @@ plan](https://gitlab.com/gitlab-org/gitaly/issues/1226#note_126519133). ## Code status -[](https://gitlab.com/gitlab-org/gitlab-shell/commits/master) -[](https://gitlab.com/gitlab-org/gitlab-shell/commits/master) +[](https://gitlab.com/gitlab-org/gitlab-shell/-/pipelines?ref=master) +[](https://gitlab.com/gitlab-org/gitlab-shell/-/pipelines?ref=master) [](https://codeclimate.com/github/gitlabhq/gitlab-shell) ## Requirements |