| 1 | image: golang:1.13 |
| 2 | |
| 3 | stages: |
| 4 | - build |
| 5 | - test |
| 6 | |
| 7 | build: |
| 8 | stage: build |
| 9 | script: |
| 10 | - go build ./... |
| 11 | |
| 12 | test: |
| 13 | stage: test |
| 14 | script: |
| 15 | - test -z "$(gofmt -l . | tee /dev/stderr)" |
| 16 | - go test ./... |
| 17 | - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0 |
| 18 | - golangci-lint run -v |