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 @@
|
||||||
[](https://godoc.org/github.com/pobri19/sqlboiler)
|
[](https://godoc.org/github.com/pobri19/sqlboiler)
|
||||||
[](https://circleci.com/gh/nullbio/sqlboiler)
|
[](https://circleci.com/gh/nullbio/sqlboiler)
|
||||||
[](http://goreportcard.com/report/nullbio/sqlboiler)
|
[](http://goreportcard.com/report/nullbio/sqlboiler)
|
||||||
|
[](http://coveralls.io/r/nullbio/sqlboiler?branch=master)
|
||||||
[](https://github.com/nullbio/sqlboiler/blob/master/LICENSE.md)
|
[](https://github.com/nullbio/sqlboiler/blob/master/LICENSE.md)
|
||||||
|
|
||||||
SQLBoiler is a tool to generate a Go ORM tailored to your database schema.
|
SQLBoiler is a tool to generate a Go ORM tailored to your database schema.
|
||||||
|
|
|
@ -1,11 +1,20 @@
|
||||||
test:
|
test:
|
||||||
pre:
|
pre:
|
||||||
- go get github.com/jstemmer/go-junit-report
|
- 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
|
- echo -e "[postgres]\nhost=\"localhost\"\nport=5432\nuser=\"ubuntu\"\ndbname=\"sqlboiler\"" > sqlboiler.toml
|
||||||
- createdb -U ubuntu sqlboiler
|
- createdb -U ubuntu sqlboiler
|
||||||
- psql -U ubuntu sqlboiler < ./testdata/test_schema.sql
|
- psql -U ubuntu sqlboiler < ./testdata/test_schema.sql
|
||||||
- ./sqlboiler postgres
|
- ./sqlboiler postgres
|
||||||
override:
|
override:
|
||||||
- go test -v -race ./... > $CIRCLE_ARTIFACTS/gotest.txt
|
- 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:
|
post:
|
||||||
- cat $CIRCLE_ARTIFACTS/gotest.txt | go-junit-report > $CIRCLE_TEST_REPORTS/junit.xml
|
- 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…
Add table
Reference in a new issue