summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2018-07-17 00:51:55 -0400
committerDave Henderson <dhenderson@gmail.com>2018-07-17 00:51:55 -0400
commitfc09081cc2dc7e743ba8a9c060f81f3b801bcb2b (patch)
tree9700b6a9dfa1ac6a9ae5156d6e950ce5560b5957
parent9c1805e66e6ffaf34b8253ed474ac55b0fe47adf (diff)
Setting up code coverage with codeclimate
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
-rw-r--r--.gitignore1
-rw-r--r--Makefile2
-rw-r--r--circle.yml2
3 files changed, 4 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 590d21e0..6c439671 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ report.xml
./gomplate
*.cid
*.iid
+*.out
diff --git a/Makefile b/Makefile
index a6c8b074..ce445dd8 100644
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,7 @@ $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS)): $(PREFIX)/bin/$(PKG_NAME)_$(
build: $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS))
test:
- $(GO) test -v -race ./...
+ $(GO) test -v -race -coverprofile=c.out ./...
integration: ./bin/gomplate
$(GO) test -v -tags=integration \
diff --git a/circle.yml b/circle.yml
index b2420ba7..c3ac8aa9 100644
--- a/circle.yml
+++ b/circle.yml
@@ -9,11 +9,13 @@ jobs:
steps:
- checkout
- run: make build
+ - run: cc-test-reporter before-build
- run:
name: make test
command: |
trap "go-junit-report < $CIRCLE_TEST_REPORTS/go-test.out > $CIRCLE_TEST_REPORTS/report.xml" EXIT
make test | tee $CIRCLE_TEST_REPORTS/go-test.out
+ cc-test-reporter after-build --exit-code $?
- run: make lint
- run: make integration
- store_artifacts: