blob: 4f90ccd39fc380036fcb083cfac2e40f98ffe91a [file] [log] [blame]
language: go
sudo: required
go:
- 1.11
install: true
before_script:
- mkdir -p $HOME/gopath/src/github.com/go-mesh/mesher
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/go-mesh/mesher
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/go-mesh/mesher
- export KUBE_CONFIG=$HOME/gopath/src/github.com/go-mesh/mesher/vendor/github.com/go-mesh/mesher-tools/test/util/sample_kubeconfig
- cd $HOME/gopath/src/github.com/go-mesh/mesher
jobs:
include:
- stage: Format Checker
script: bash -x scripts/travis/formatChecker.sh
- stage: DeadCode Checker
script:
- go get -u github.com/tsenart/deadcode
- bash -x scripts/travis/deadCodeChecker.sh
- stage: Misspell Checker
script:
- go get -u github.com/client9/misspell
- bash -x scripts/travis/misspellChecker.sh
- stage: GoConst Checker
script:
- go get -u github.com/jgautheron/goconst/cmd/goconst
- bash -x scripts/travis/goConstChecker.sh
- stage: GoLint Checker
script:
- go get -u github.com/golang/lint/golint
- bash -x scripts/travis/goLintChecker.sh
- stage: GoCyclo Checker
script:
- go get github.com/fzipp/gocyclo
- bash -x scripts/travis/goCycloChecker.sh
- stage: Build
script:
- GO111MODULE=on go mod download
- GO111MODULE=on go mod vendor
- go build
- stage: Unit Test
script:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- GO111MODULE=on go mod download
- GO111MODULE=on go mod vendor
- bash -x scripts/travis/unit_test.sh && $HOME/gopath/bin/goveralls -coverprofile=coverage.txt -service=travis-ci