From 19ee627091ccc86c5aea7f5657276782400cbf5f Mon Sep 17 00:00:00 2001 From: khoipham Date: Sat, 28 Dec 2019 09:52:02 +0700 Subject: [PATCH] Add code coverage --- .travis.yml | 6 +++++- README.md | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 446d850..bbb507b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: go +sudo: false go: - 1.12.x - 1.13.x @@ -6,4 +7,7 @@ env: - PG_CONN=postgresql://postgres:@localhost:5432/postgres?sslmode=disable services: - postgresql -scripts: go test github.com/casbin/casbin-pg-adapter +before_install: + - go get github.com/mattn/goveralls +script: + - $HOME/gopath/bin/goveralls -service=travis-ci diff --git a/README.md b/README.md index 6cf2106..5916b28 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ -[![Build Status](https://travis-ci.org/casbin/casbin-pg-adapter.svg?branch=master)](https://travis-ci.org/casbin/casbin-pg-adapter) - # Go-pg Adapter +[![Build Status](https://travis-ci.org/casbin/casbin-pg-adapter.svg?branch=master)](https://travis-ci.org/casbin/casbin-pg-adapter) +[![Coverage Status](https://coveralls.io/repos/github/casbin/casbin-pg-adapter/badge.svg?branch=master)](https://coveralls.io/github/casbin/casbin-pg-adapter?branch=master) + Go-pg Adapter is the [Go-pg](https://github.com/go-pg/pg) adapter for [Casbin](https://github.com/casbin/casbin). With this library, Casbin can load policy from PostgreSQL or save policy to it. ## Installation