Add goveralls to circleCI and coveralls badge
This commit is contained in:
parent
79ad706f78
commit
54696e75ca
2 changed files with 10 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue