2016-08-15 12:02:47 +02:00
|
|
|
test:
|
2016-08-05 07:20:31 +02:00
|
|
|
pre:
|
2016-08-16 09:34:57 +02:00
|
|
|
- mkdir -p /home/ubuntu/.go_workspace/src/github.com/jstemmer
|
2016-11-12 08:18:01 +01:00
|
|
|
- go get -u github.com/jstemmer/go-junit-report
|
2016-09-20 10:26:21 +02:00
|
|
|
- echo -e "[postgres]\nhost=\"localhost\"\nport=5432\nuser=\"ubuntu\"\ndbname=\"sqlboiler\"\n[mysql]\nhost=\"localhost\"\nport=3306\nuser=\"ubuntu\"\ndbname=\"sqlboiler\"\nsslmode=\"false\"" > sqlboiler.toml
|
2016-08-05 07:20:31 +02:00
|
|
|
- createdb -U ubuntu sqlboiler
|
2016-09-17 03:15:03 +02:00
|
|
|
- psql -U ubuntu sqlboiler < ./testdata/postgres_test_schema.sql
|
2016-09-20 10:26:21 +02:00
|
|
|
- echo "create database sqlboiler;" | mysql -u ubuntu
|
|
|
|
- mysql -u ubuntu sqlboiler < ./testdata/mysql_test_schema.sql
|
|
|
|
- ./sqlboiler postgres -o "postgres"
|
|
|
|
- ./sqlboiler postgres -o "mysql"
|
2016-08-05 07:20:31 +02:00
|
|
|
override:
|
2016-08-08 09:03:21 +02:00
|
|
|
- go test -v -race ./... > $CIRCLE_ARTIFACTS/gotest.txt
|
|
|
|
post:
|
|
|
|
- cat $CIRCLE_ARTIFACTS/gotest.txt | go-junit-report > $CIRCLE_TEST_REPORTS/junit.xml
|
2016-08-15 11:58:32 +02:00
|
|
|
|
2016-08-15 12:02:47 +02:00
|
|
|
machine:
|
|
|
|
environment:
|
2016-08-16 05:22:50 +02:00
|
|
|
GODIST: "go1.7.linux-amd64.tar.gz"
|
2016-08-15 12:02:47 +02:00
|
|
|
post:
|
|
|
|
- mkdir -p download
|
|
|
|
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
|
|
|
|
- sudo rm -rf /usr/local/go
|
|
|
|
- sudo tar -C /usr/local -xzf download/$GODIST
|
|
|
|
|
2016-08-15 11:58:32 +02:00
|
|
|
dependencies:
|
|
|
|
cache_directories:
|
|
|
|
- ~/download
|