From 000ed0ee7e24b47d6330bc5527c3c96c2a5c5037 Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Wed, 12 Dec 2018 13:13:49 +0100 Subject: [PATCH] Add coverage service --- .drone.yml | 10 +++++++++- Makefile | 8 +++++++- README.md | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 75d3eb7..2fe0e8f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,6 +26,14 @@ pipeline: GOPATH: /go commands: - make test build + coverage: + image: golang:1.10 + pull: true + environment: + GOPATH: /go + secrets: [ coveralls_token ] + commands: + - make coverage static: image: golang:1.10 pull: true @@ -115,4 +123,4 @@ pipeline: services: gitea: image: jonasfranz/gitea-service - pull: true \ No newline at end of file + pull: true diff --git a/Makefile b/Makefile index b738b93..349eb32 100644 --- a/Makefile +++ b/Makefile @@ -81,4 +81,10 @@ vet: .PHONY: test test: lint vet go test -tags web -cover ./... - \ No newline at end of file + +.PHONY: coverage +coverage: + @hash goveralls > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ + $(GO) get -u github.com/mattn/goveralls; \ + fi + goveralls -service=drone.io -endpoint=https://coverage.jonasfranz.software \ No newline at end of file diff --git a/README.md b/README.md index 0913732..6907916 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Docker Pulls](https://img.shields.io/docker/pulls/ggmigrator/web.svg)](https://hub.docker.com/r/ggmigrator/web/) [![Go Report Card](https://goreportcard.com/badge/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator)](https://goreportcard.com/report/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator) [![GoDoc](https://godoc.org/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator?status.svg)](https://godoc.org/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator) - +[![Coverage Status](https://coverage.jonasfranz.software/projects/1/badge.svg)](https://coverage.jonasfranz.software/projects/1) A tool to migrate [GitHub](https://github.com) Repositories to [Gitea](https://gitea.io) including all issues, labels, milestones and comments.