language: go
go:
  - stable
  - master
  - "1.x"
  - "1.8.x"
  - "1.9.x"
  - "1.10.x"
  - "1.11.x"
  - "1.12.x"

env:
  - GO111MODULE=on GOPROXY=https://proxy.golang.org

go_import_path: go.elastic.co/apm

dist: xenial
matrix:
  fast_finish: true
  allow_failures:
    - os: osx
    - go: "1.x"
    - go: master

before_install:
  - ./scripts/before_install.sh

script:
  - make install check

jobs:
  include:
    - os: osx

    - stage: coverage
      sudo: required
      services:
        - docker
      script:
        - ./scripts/docker-test.sh
        - bash <(curl -s https://codecov.io/bash)
