Skip to content

Commit

Permalink
Code coverage and coveralls
Browse files Browse the repository at this point in the history
Added code coverage to the tests and setup coveralls to track the
coverage over time.

Issue eksctl-io#46

Signed-off-by: Richard Case <richard.case@outlook.com>
  • Loading branch information
richardcase committed Aug 9, 2018
1 parent d36b558 commit e44dcad
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ jobs:
steps:
- checkout
- run: make release
test:
machine: true
steps:
- checkout
- run: make install-goveralls
- run: make coverage

workflows:
version: 2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ _site

# Do not add temporary files here
# use ~/.config/git/ignore instead

# Test coverage output
coverage.out
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@ build:

.PHONY: test
test:
go test -v ./pkg/... ./cmd/...
go test -v -covermode=count -coverprofile=coverage.out ./pkg/... ./cmd/...

.PHONY: coverage
coverage: test
goveralls -coverprofile=coverage.out -service=circle-ci -repotoken $(COVERALLS_TOKEN)

.PHONY: install-goveralls
install-goveralls:
go get github.com/mattn/goveralls

.PHONY: update-bindata
update-bindata:
go generate ./pkg/eks


.PHONY: install-bindata
install-bindata:
go get -u github.com/jteeuwen/go-bindata/...
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `eksctl` - a CLI for Amazon EKS

[![Circle CI](https://circleci.com/gh/weaveworks/eksctl/tree/master.svg?style=shield)](https://circleci.com/gh/weaveworks/eksctl/tree/master)
[![Circle CI](https://circleci.com/gh/weaveworks/eksctl/tree/master.svg?style=shield)](https://circleci.com/gh/weaveworks/eksctl/tree/master) [![Coverage Status](https://coveralls.io/repos/github/weaveworks/eksctl/badge.svg?branch=master)](https://coveralls.io/github/weaveworks/eksctl?branch=master)

`eksctl` is a simple CLI tool for creating clusters on EKS - Amazon's new managed Kubernetes service for EC2. It is written in Go, and based on Amazon's official CloudFormation templates.

Expand Down

0 comments on commit e44dcad

Please # to comment.