language: go
go:
  - 1.8
services:
  - postgresql
before_script:
  - |
    psql \
      --command='create database travis_ci_test;' \
      --username='postgres'
  - |
    psql \
      --command='
        CREATE TABLE animals(
          id serial PRIMARY KEY,
          slug text NOT NULL UNIQUE,
          name text NOT NULL,
          age int NOT NULL
        );' \
      --username='postgres' \
      --dbname='travis_ci_test'
script:
  - go test -race -coverprofile=coverage.txt -covermode=atomic
after_success:
  - bash <(curl -s https://codecov.io/bash)

language: go
go:
  - 1.2
  - 1.3
  - 1.4
  - 1.5
  - 1.6
  - 1.7
  - 1.8
services:
  - postgresql
before_script:
  - |
    psql \
      --command='create database travis_ci_test;' \
      --username='postgres'
  - |
    psql \
      --command='
        CREATE TABLE animals(
          id serial PRIMARY KEY,
          slug text NOT NULL UNIQUE,
          name text NOT NULL,
          age int NOT NULL
        );' \
      --username='postgres' \
      --dbname='travis_ci_test'
script:
  - go test -race -coverprofile=coverage.txt -covermode=atomic
after_success:
  - bash <(curl -s https://codecov.io/bash)

Test support back to Go 1.2
Test support back to Go 1.2
