---
kind: pipeline
name: testing

trigger:
  ref:
  - refs/heads/master
  - refs/pull/*/head

steps:
- name: test
  pull: default
  image: golang:1.11
  commands:
  - go get -u golang.org/x/lint/golint
  - golint ./...
  - go vet
  - go test -v -race -coverprofile=coverage.txt -covermode=atomic
  environment:
    GOPROXY: https://goproxy.io
    GO111MODULE: "on"