diff --git a/.travis.yml b/.travis.yml index 5f60ea86..c2a616f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ matrix: - DEFAULT_ARCH=rpi2 make install-docker-deps - DEFAULT_ARCH=rpi3 make install-docker-deps - make install-deps-no-envs + - make install-coveralls script: - make clean - DEFAULT_TARGET=rpi1 make build-docker @@ -26,44 +27,52 @@ matrix: install: - DEFAULT_ARCH=android make install-docker-deps - make install-deps-no-envs + - make install-coveralls script: - make clean - DEFAULT_TARGET=android make build-docker - DEFAULT_TARGET=android-emulator make build-docker - make lint - make test + - make test-cover-travis - stage: Linux install: - make install-docker-deps - make install-deps-no-envs - make install-linters + - make install-coveralls script: - make clean - DEFAULT_TARGET=linux make build-docker - make test - make lint + - make test-cover-travis - stage: Windows os: windows install: - choco install make -y - travis_wait make install-deps-Windows - make install-linters + - make install-coveralls script: - make build - make test - make build-icon - make lint + - make test-cover-travis - stage: MacOS os: osx osx_image: xcode10.2 install: - make install-deps + - make install-coveralls script: - make clean - make build - make test - make build-icon - make lint + - make test-cover-travis notifications: email: false webhooks: https://fathomless-fjord-24024.herokuapp.com/notify @@ -83,6 +92,7 @@ deploy: kip_cleanup: true draft: true overwrite: true - on: + on: repo: fibercrypto/FiberCryptoWallet tags: true + diff --git a/Makefile b/Makefile index c83bed23..d61e487c 100644 --- a/Makefile +++ b/Makefile @@ -199,6 +199,15 @@ test-sky-launch-html-cover: go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/coin/skycoin/models go tool cover -html=$(COVERAGEFILE) -o $(COVERAGEHTML) +test-cover-travis: + go test -covermode=count -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/util + $(HOME)/gopath/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP + go test -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/coin/skycoin/models + $(HOME)/gopath/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP + go test -cover -covermode=count -coverprofile=$(COVERAGEFILE) -timeout 30s github.com/fibercrypto/FiberCryptoWallet/src/coin/skycoin + $(HOME)/gopath/bin/goveralls -coverprofile=$(COVERAGEFILE) -service=travis-ci -repotoken 1zkcSxi8TkcxpL2zTQOK9G5FFoVgWjceP + + test-cover: clean-test test-sky-launch-html-cover ## Show more details of test coverage test: clean-test test-core test-sky ## Run project test suite @@ -207,6 +216,10 @@ install-linters: ## Install linters go get -u github.com/FiloSottile/vendorcheck cat ./.travis/install-golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.21.0 +install-coveralls: ## Install coveralls + go get golang.org/x/tools/cmd/cover + go get github.com/mattn/goveralls + lint: ## Run linters. Use make install-linters first. # src needs separate linting rules golangci-lint run -c .golangci.yml ./src/coin/... diff --git a/README.md b/README.md index b8555731..ad3680b5 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Build Status](https://travis-ci.org/fibercrypto/FiberCryptoWallet.svg?branch=develop)](https://travis-ci.org/fibercrypto/FiberCryptoWallet) [![Contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)](CONTRIBUTING.md) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE.GPLv3) +[![Coverage Status](https://coveralls.io/repos/github/fibercrypto/FiberCryptoWallet/badge.svg?branch=develop)](https://coveralls.io/github/fibercrypto/FiberCryptoWallet?branch=develop) FiberCrypto wallet is a cryptocurrency software wallet aimed at: