Commit 8fa34beb authored by Andrew Newdigate's avatar Andrew Newdigate Committed by Jacob Vosmaer

Use codecov for better code coverage reporting

parent 7d83fffa
ignore:
- "_support"
- "_build"
- "vendor"
- "ruby/vendor"
comment:
layout: "diff, flags, files"
require_changes: fale
behavior: default
......@@ -41,6 +41,8 @@ cover:
stage: build_test
script:
- make cover
after_script:
- bash <(curl -s https://codecov.io/bash) -t "${CODECOV_TOKEN}" -f _build/cover/all.merged -F unittests
artifacts:
paths:
- _build/cover/all.html
......
......@@ -84,17 +84,17 @@ govendor-status: $(TARGET_SETUP) $(GOVENDOR)
$(TEST_REPO):
git clone --bare https://gitlab.com/gitlab-org/gitlab-test.git $@
.PHONY: prepare-tests
prepare-tests: $(TARGET_SETUP) $(TEST_REPO) .ruby-bundle
.PHONY: test
test: $(TARGET_SETUP) $(TEST_REPO) prepare-tests .ruby-bundle
test: prepare-tests
@go test $(LOCAL_PACKAGES)
.PHONY: test-changes
test-changes: $(TARGET_SETUP) $(TEST_REPO) prepare-tests .ruby-bundle
test-changes: prepare-tests
cd $(PKG_BUILD_DIR) && go test $(CHANGED_LOCAL_GO_PACKAGES)
.PHONY: prepare-tests
prepare-tests: $(TARGET_SETUP) $(TEST_REPO)
.PHONY: lint
lint: $(GOLINT)
go run _support/lint.go
......@@ -134,7 +134,7 @@ clean:
rm -rf $(TARGET_DIR) $(TEST_REPO) $(TEST_REPO_STORAGE_PATH) ./internal/service/ssh/gitaly-*-pack .ruby-bundle
.PHONY: cover
cover: $(TARGET_SETUP) $(TEST_REPO) $(GOCOVMERGE)
cover: prepare-tests $(GOCOVMERGE)
@echo "NOTE: make cover does not exit 1 on failure, don't use it to check for tests success!"
mkdir -p "$(COVERAGE_DIR)"
rm -f $(COVERAGE_DIR)/*.out "$(COVERAGE_DIR)/all.merged" "$(COVERAGE_DIR)/all.html"
......
# ![Gitaly](https://gitlab.com/gitlab-org/gitaly/uploads/509123ed56bd51247996038c858db006/gitaly-wordmark-small.png)
[![build status](https://gitlab.com/gitlab-org/gitaly/badges/master/build.svg)](https://gitlab.com/gitlab-org/gitaly/commits/master) [![Gem Version](https://badge.fury.io/rb/gitaly.svg)](https://badge.fury.io/rb/gitaly) [![coverage report](https://gitlab.com/gitlab-org/gitaly/badges/master/coverage.svg)](https://gitlab.com/gitlab-org/gitaly/commits/master)
[![build status](https://gitlab.com/gitlab-org/gitaly/badges/master/build.svg)](https://gitlab.com/gitlab-org/gitaly/commits/master) [![Gem Version](https://badge.fury.io/rb/gitaly.svg)](https://badge.fury.io/rb/gitaly) [![coverage report](https://gitlab.com/gitlab-org/gitaly/badges/master/coverage.svg)](https://codecov.io/gl/gitlab-org/gitaly)
**Quick Links**:
[**Migration Board**](https://gitlab.com/gitlab-org/gitaly/boards/331341?scope=all&utf8=%E2%9C%93&state=opened&label_name[]=Migration) |
......
......@@ -110,7 +110,7 @@ func TestLimiter(t *testing.T) {
iterations: 200,
delay: 1000 * time.Nanosecond,
buckets: 1,
wantMaxRange: []int{10, 10},
wantMaxRange: []int{8, 10},
wantMonitorCalls: false,
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment