magnetico/.travis.yml
2018-08-03 12:23:00 +03:00

49 lines
1.6 KiB
YAML

# https://gist.github.com/y0ssar1an/df2dab474520c4086926f672c52db139
# This is a weird way of telling Travis to use the fast container-based test
# runner instead of the slow VM-based runner.
sudo: false
language: go
go:
- "1.10"
# Only clone the most recent commit.
git:
depth: 1
env:
- DEP_VERSION="0.5.0"
before_install:
# Download the binary to bin folder in $GOPATH
- 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
install:
- "go get -u github.com/jteeuwen/go-bindata/..."
- "dep ensure"
before_script:
- "go-bindata
-o=\"GOPATH/src/github.com/boramalper/magnetico/cmd/magneticow/bindata.go\"
-prefix=\"GOPATH/src/github.com/boramalper/magnetico/cmd/magneticow/data/\"
GOPATH/src/github.com/boramalper/magnetico/cmd/magneticow/data/..."
script:
# The Unit Tests
- "go test github.com/boramalper/magnetico/cmd/magneticod/..."
- "go test github.com/boramalper/magnetico/cmd/magneticow/..."
- "go test github.com/boramalper/magnetico/pkg/persistence/..."
# Static Analysis (vet)
- "go vet github.com/boramalper/magnetico/cmd/magneticod/..."
- "go vet github.com/boramalper/magnetico/cmd/magneticow/..."
- "go vet github.com/boramalper/magnetico/pkg/persistence/..."
# Formatting Errors
- "gofmt -l GOPATH/src/github.com/boramalper/magnetico/cmd/magneticod/"
- "gofmt -l GOPATH/src/github.com/boramalper/magnetico/cmd/magneticow/"
- "gofmt -l GOPATH/src/github.com/boramalper/magnetico/pkg/persistence/"