diff --git a/.travis.yml b/.travis.yml index 94a0f9d1..e1646303 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,50 +1,75 @@ -language: go - dist: trusty - sudo: required - -go: - - 1.9 - - "1.10" - - tip +language: go install: - go get -t -v ./... + - go get -v -tags sqlite github.com/gobuffalo/pop/soda before_script: - - go get -v -tags sqlite github.com/gobuffalo/pop/soda - # travis hangs when trying to create mysql db using soda. not sure why - - mysql -e 'create database pop_test;' - - soda create -e "postgres" - - soda create -e "sqlite" - - soda migrate -e "mysql_travis" - - soda migrate -e "postgres" - - soda migrate -e "sqlite" + - soda create -e $SODA_DIALECT + - soda migrate -e $SODA_DIALECT -script: go test -tags sqlite ./... -v +script: + - go test -tags sqlite ./... -v global_env: - MYSQL_USER="travis" - MYSQL_PASSWORD="" - POSTGRES_PASSWORD="" -env: - - SODA_DIALECT="postgres" - - SODA_DIALECT="mysql_travis" - - SODA_DIALECT="sqlite" +.mysql: &mysql + services: + - mysql + addons: + apt: + sources: + - mysql-5.7-trusty + packages: + - mysql-server -services: - - mysql +.postgres: &postgres + addons: + postgresql: "9.5" -addons: - postgresql: "9.5" - apt: - sources: - - mysql-5.7-trusty - packages: - - mysql-server +.mariadb: &mariadb + addons: + mariadb: '10.0' matrix: + include: + - dist: trusty + go: 1.9 + env: SODA_DIALECT="postgres" + <<: *postgres + - dist: trusty + go: 1.9 + env: SODA_DIALECT="mysql_travis" + <<: *mysql + - dist: trusty + go: 1.9 + env: SODA_DIALECT="sqlite" + - dist: trusty + go: "1.10" + env: SODA_DIALECT="postgres" + <<: *postgres + - dist: trusty + go: "1.10" + env: SODA_DIALECT="mysql_travis" + <<: *mysql + - dist: trusty + go: "1.10" + env: SODA_DIALECT="sqlite" + - dist: trusty + go: "tip" + env: SODA_DIALECT="postgres" + <<: *postgres + - dist: trusty + go: "tip" + env: SODA_DIALECT="mysql_travis" + <<: *mysql + - dist: trusty + go: "tip" + env: SODA_DIALECT="sqlite" allow_failures: - - go: 'tip' + - go: 'tip' \ No newline at end of file