From 85e426584df16491629e39b05625b7f727a4ef39 Mon Sep 17 00:00:00 2001 From: mrz1836 Date: Sun, 26 Apr 2020 11:40:28 -0400 Subject: [PATCH] Added code coverage --- .travis.yml | 8 ++++++-- Makefile | 14 +++++++------- README.md | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 137afa9..006bd7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,12 @@ notifications: before_script: - go get -u golang.org/x/lint/golint -# Run scripts in parallel +# Run all scripts script: - golint - go vet - - go test -short -v ./... \ No newline at end of file + - go test -short -race -coverprofile=coverage.txt -covermode=atomic + +# After build success +after_success: + - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/Makefile b/Makefile index 4b748db..370016f 100644 --- a/Makefile +++ b/Makefile @@ -41,11 +41,11 @@ lint: ## Run the Go lint application golint release: ## Full production release (creates release in Github) - goreleaser --rm-dist - make godocs + goreleaser --rm-dist + make godocs release-test: ## Full production test release (everything except deploy) - goreleaser --skip-publish --rm-dist + goreleaser --skip-publish --rm-dist release-snap: ## Test the full release (build binaries) goreleaser --snapshot --skip-publish --rm-dist @@ -71,13 +71,13 @@ tag-update: ## Update an existing tag to current commit (IE: make tag-update ver git fetch --tags -f test: ## Runs vet, lint and ALL tests - go vet -v - golint + make vet + make lint go test ./... -v test-short: ## Runs vet, lint and tests (excludes integration tests) - go vet -v - golint + make vet + make lint go test ./... -v -test.short update: ## Update all project dependencies diff --git a/README.md b/README.md index 7fc4a66..ce04166 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **go-pipl** is a simple golang wrapper to help find people using the [pipl.com API](https://pipl.com/api/). [![Go](https://img.shields.io/github/go-mod/go-version/mrz1836/go-pipl)](https://golang.org/) -[![Build Status](https://travis-ci.com/mrz1836/go-pipl.svg?branch=master)](https://travis-ci.com/mrz1836/go-pipl) +[![Build Status](https://travis-ci.org/mrz1836/go-pipl.svg?branch=master)](https://travis-ci.org/mrz1836/go-pipl) [![Report](https://goreportcard.com/badge/github.com/mrz1836/go-pipl?style=flat)](https://goreportcard.com/report/github.com/mrz1836/go-pipl) [![Release](https://img.shields.io/github/release-pre/mrz1836/go-pipl.svg?style=flat)](https://github.com/mrz1836/go-pipl/releases) [![GoDoc](https://godoc.org/github.com/mrz1836/go-pipl?status.svg&style=flat)](https://pkg.go.dev/github.com/mrz1836/go-pipl?tab=doc)