Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2017-10-09 12:08:50 +0300
committerJacob Vosmaer (GitLab) <jacob@gitlab.com>2017-10-09 12:08:50 +0300
commit8fa34beb8aff6cfc0ab75ad88fc8495c85816b16 (patch)
tree7777dae2c79a3d8b8aee8114d77de75bee05eaae
parent7d83fffa7bdf55e9e0536e756545747d0c86453f (diff)
Use codecov for better code coverage reporting
-rw-r--r--.codecov.yml10
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--Makefile12
-rw-r--r--README.md2
-rw-r--r--internal/middleware/limithandler/concurrency_limiter_test.go2
5 files changed, 20 insertions, 8 deletions
diff --git a/.codecov.yml b/.codecov.yml
new file mode 100644
index 000000000..19eed7b0b
--- /dev/null
+++ b/.codecov.yml
@@ -0,0 +1,10 @@
+ignore:
+ - "_support"
+ - "_build"
+ - "vendor"
+ - "ruby/vendor"
+
+comment:
+ layout: "diff, flags, files"
+ require_changes: fale
+ behavior: default
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f004335b9..2250c4c2b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -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
diff --git a/Makefile b/Makefile
index 760b8bc46..f32cd684f 100644
--- a/Makefile
+++ b/Makefile
@@ -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"
diff --git a/README.md b/README.md
index 30e6023e5..3494275af 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# ![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) |
diff --git a/internal/middleware/limithandler/concurrency_limiter_test.go b/internal/middleware/limithandler/concurrency_limiter_test.go
index be7acb8f4..d11449e34 100644
--- a/internal/middleware/limithandler/concurrency_limiter_test.go
+++ b/internal/middleware/limithandler/concurrency_limiter_test.go
@@ -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,
},
{