aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2020-03-15 21:18:32 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2020-03-15 21:18:32 +0100
commit9d0f15c4fa712cdacfa3887e9baac918f093fbf6 (patch)
treeeb1a4db1169ba4bb9ae58727a462d54f93f5f85c /Makefile
parent8fe5ed769fa01a42eafb3b7f064ffe8e0d436408 (diff)
downloadgo-git-9d0f15c4fa712cdacfa3887e9baac918f093fbf6.tar.gz
ci: based on github actionsv5.0.0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 5 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 6acd035..d10922f 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ WORKDIR = $(PWD)
# Go parameters
GOCMD = go
-GOTEST = $(GOCMD) test -v
+GOTEST = $(GOCMD) test
# Git config
GIT_VERSION ?=
@@ -11,12 +11,8 @@ GIT_DIST_PATH ?= $(PWD)/.git-dist
GIT_REPOSITORY = http://github.com/git/git.git
# Coverage
-COVERAGE_REPORT = coverage.txt
-COVERAGE_MODE = atomic
-
-ifneq ($(origin CI), undefined)
- WORKDIR := $(GOPATH)/src/github.com/go-git/go-git/v5
-endif
+COVERAGE_REPORT = coverage.out
+COVERAGE_MODE = count
build-git:
@if [ -f $(GIT_DIST_PATH)/git ]; then \
@@ -30,11 +26,11 @@ build-git:
fi
test:
- @cd $(WORKDIR); \
+ @echo "running against `git version`"; \
$(GOTEST) ./...
test-coverage:
- @cd $(WORKDIR); \
+ @echo "running against `git version`"; \
echo "" > $(COVERAGE_REPORT); \
$(GOTEST) -coverprofile=$(COVERAGE_REPORT) -coverpkg=./... -covermode=$(COVERAGE_MODE) ./...