Skip to content

Commit 11f31bd

Browse files
authored
Setup code coverage (#5)
* Update .travis.yml * Update .travis.yml * Update README.md
1 parent 1afd141 commit 11f31bd

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.travis.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
language: go
22
go:
33
- "1.14.x"
4+
env:
5+
- COVER=-coverprofile=c.out
46
script:
5-
- go test -race ./...
6-
7+
- go test -race $COVER ./...
8+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
9+
- chmod +x ./cc-test-reporter
10+
after_script:
11+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# go-todo-backend
22

3+
[![GoDoc](https://godoc.org/github.com/Fs02/go-todo-backend?status.svg)](https://godoc.org/github.com/Fs02/go-todo-backend)
4+
[![Build Status](https://travis-ci.com/Fs02/go-todo-backend.svg?branch=master)](https://travis-ci.com/Fs02/go-todo-backend)
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/Fs02/go-todo-backend)](https://goreportcard.com/report/github.com/Fs02/go-todo-backend)
6+
[![Maintainability](https://api.codeclimate.com/v1/badges/d506b5b2df687cbcd358/maintainability)](https://codeclimate.com/github/Fs02/go-todo-backend/maintainability)
7+
[![Test Coverage](https://api.codeclimate.com/v1/badges/d506b5b2df687cbcd358/test_coverage)](https://codeclimate.com/github/Fs02/go-todo-backend/test_coverage)
8+
39
Go Todo Backend Example Using Modular Project Layout for Product Microservice. It's suitable as starting point for a medium to larger project.
410

511
This example uses [Chi](https://github.com/go-chi/chi) for http router and [REL](https://github.com/Fs02/rel) for database access.

0 commit comments

Comments
 (0)