Skip to content

Commit

Permalink
Setup Postgres for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mars committed Oct 25, 2018
1 parent 219bca0 commit d369d18
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@ dist: trusty
sudo: required
services:
- docker
- postgresql
language: go
go:
- "1.11"
addons:
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10

# add TF_CONSUL_TEST=1 to run consul tests
# they were causing timouts in travis
# add TF_ETCDV3_TEST=1 to run etcdv3 tests
# if added, TF_ETCDV3_ENDPOINTS must be set to a comma-separated list of (insecure) etcd endpoints against which to test
env:
- CONSUL_VERSION=0.7.5 GOMAXPROCS=4
- DATABASE_URL=postgres://localhost/terraform_backend_pg_test?sslmode=disable

# Fetch consul for the backend and provider tests
before_install:
Expand All @@ -31,6 +39,7 @@ install:

before_script:
- git config --global url.https://github.com/.insteadOf ssh://git@github.com/
- psql -c 'create database terraform_backend_pg_test;' -U postgres

script:
- make vendor-status
Expand Down

0 comments on commit d369d18

Please sign in to comment.