Add goveralls to circleCI and coveralls badge

This commit is contained in:
Patrick O'brien 2016-08-08 18:15:16 +10:00
parent 79ad706f78
commit 54696e75ca
2 changed files with 10 additions and 0 deletions

View file

@ -3,6 +3,7 @@
[![GoDoc](https://godoc.org/github.com/pobri19/sqlboiler?status.svg)](https://godoc.org/github.com/pobri19/sqlboiler)
[![CircleCI](https://circleci.com/gh/nullbio/sqlboiler.svg?style=shield)](https://circleci.com/gh/nullbio/sqlboiler)
[![Go Report Card](https://goreportcard.com/badge/kubernetes/helm)](http://goreportcard.com/report/nullbio/sqlboiler)
[![Coverage Status](http://coveralls.io/repos/nullbio/sqlboiler/badge.png?branch=master)](http://coveralls.io/r/nullbio/sqlboiler?branch=master)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nullbio/sqlboiler/blob/master/LICENSE.md)
SQLBoiler is a tool to generate a Go ORM tailored to your database schema.

View file

@ -1,11 +1,20 @@
test:
pre:
- go get github.com/jstemmer/go-junit-report
- go get github.com/mattn/goveralls
- echo -e "[postgres]\nhost=\"localhost\"\nport=5432\nuser=\"ubuntu\"\ndbname=\"sqlboiler\"" > sqlboiler.toml
- createdb -U ubuntu sqlboiler
- psql -U ubuntu sqlboiler < ./testdata/test_schema.sql
- ./sqlboiler postgres
override:
- go test -v -race ./... > $CIRCLE_ARTIFACTS/gotest.txt
- >
echo "mode: set" > $CIRCLE_ARTIFACTS/coverage.txt &&
for i in $(go list ./...); do
rm -f coverage.tmp;
go test -v -coverprofile coverage.tmp $i;
tail -n +2 coverage.tmp >> $CIRCLE_ARTIFACTS/coverage.txt;
done
post:
- cat $CIRCLE_ARTIFACTS/gotest.txt | go-junit-report > $CIRCLE_TEST_REPORTS/junit.xml
- goveralls -coverprofile=$CIRCLE_ARTIFACTS/coverage.txt -service=circle-ci -repotoken=$COVERALLS_TOKEN