---
  language: go
  sudo: required
  services:
  - docker
  notifications:
    email: true
  go:
    - 1.x
    - tip
  env:
    global:
      - GO15VENDOREXPERIMENT=1
  matrix:
    allow_failures:
      - go: tip
    fast_finish: true
  install:
    - go get github.com/golang/lint/golint
    - go get honnef.co/go/tools/cmd/staticcheck
    - sudo apt update && sudo apt install -y libapparmor-dev libseccomp-dev
  script:
    - make IMAGE=alpine BUILDTAGS=apparmor
    - go vet $(go list ./... | grep -v vendor)
    - staticcheck $(go list ./... | grep -v vendor)
    - test -z "$(golint ./... | grep -v vendor | tee /dev/stderr)"
    - test -z "$(gofmt -s -l . | grep -v vendor | grep -v bindata.go | tee /dev/stderr)"
    - go test $(go list ./... | grep -v vendor)
    - make cover
  after_success:
    - bash <(curl -s https://codecov.io/bash)
