2018-08-07 09:30:23 +02:00
|
|
|
# https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system
|
2018-08-03 10:51:20 +02:00
|
|
|
sudo: false
|
2018-12-30 06:21:56 +01:00
|
|
|
dist: xenial
|
2018-08-03 10:51:20 +02:00
|
|
|
|
2017-10-04 15:07:48 +02:00
|
|
|
language: go
|
|
|
|
go:
|
2018-12-30 06:21:56 +01:00
|
|
|
- "1.11"
|
2017-06-05 13:38:36 +02:00
|
|
|
|
2018-08-03 10:51:20 +02:00
|
|
|
# Only clone the most recent commit.
|
|
|
|
git:
|
|
|
|
depth: 1
|
2017-06-05 13:38:36 +02:00
|
|
|
|
2018-08-03 10:51:20 +02:00
|
|
|
env:
|
|
|
|
- DEP_VERSION="0.5.0"
|
|
|
|
|
|
|
|
before_install:
|
2018-08-03 11:54:26 +02:00
|
|
|
# Dump environment variables
|
|
|
|
- printenv
|
2018-12-30 06:21:56 +01:00
|
|
|
# Download dep binary to bin folder in $GOPATH
|
2018-08-03 10:51:20 +02:00
|
|
|
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
|
|
|
|
# Make the binary executable
|
|
|
|
- chmod +x $GOPATH/bin/dep
|
2017-10-04 15:07:48 +02:00
|
|
|
|
2017-06-05 13:38:36 +02:00
|
|
|
install:
|
2018-12-30 06:21:56 +01:00
|
|
|
- "go get -u -v github.com/kevinburke/go-bindata/..."
|
|
|
|
- "go get -u -v honnef.co/go/tools/cmd/staticcheck"
|
|
|
|
- "make ensure"
|
2018-08-03 11:23:00 +02:00
|
|
|
|
|
|
|
before_script:
|
2018-12-30 06:21:56 +01:00
|
|
|
- "make magneticod"
|
|
|
|
- "make magneticow"
|
2017-06-05 13:38:36 +02:00
|
|
|
|
|
|
|
script:
|
2018-08-03 10:51:20 +02:00
|
|
|
# The Unit Tests
|
2018-12-30 06:21:56 +01:00
|
|
|
- "make test"
|
2018-08-03 10:51:20 +02:00
|
|
|
|
|
|
|
# Static Analysis (vet)
|
2018-12-30 06:21:56 +01:00
|
|
|
- "make vet"
|
|
|
|
|
|
|
|
# Check formatting
|
|
|
|
- "make check-formatting"
|