From 700973cab342ada903f35caac9acbb485c063a62 Mon Sep 17 00:00:00 2001 From: Jason Moiron Date: Tue, 27 Feb 2018 23:06:26 -0500 Subject: [PATCH] try adding travis --- .travis.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..a9e2008f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +# vim: ft=yaml sw=2 ts=2 + +language: go + +# enable database services +services: + - mysql + - postgresql + +# create test database +before_install: + - mysql -e 'CREATE DATABASE IF NOT EXISTS sqlxtest;' + - psql -c 'create database sqlxtest;' -U postgres + - go get github.com/mattn/goveralls + +# go versions to test +go: + - "1.8" + - "1.9" + - "1.10.x" + +# environment to test everything at once; we want to avoid build matrixes +env: + - SQLX_MYSQL_DSN="travis:@/sqlxtest?parseTime=true" + - SQLX_POSTGRES_DSN="postgres://postgres:@localhost/sqlxtest?sslmode=disable" + - SQLX_SQLITE_DSN="$HOME/sqlxtest.db" + +# run tests w/ coverage +script: + - $GOPATH/bin/goveralls -service=travis-ci