Skip to content

Commit

Permalink
try adding travis
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoiron committed Feb 28, 2018
1 parent 05cef07 commit 700973c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 700973c

Please sign in to comment.