forked from go-chassis/go-chassis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·52 lines (48 loc) · 1.7 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
language: go
sudo: required
go:
- 1.12
install: true
before_script:
- mkdir -p $HOME/gopath/src/github.com/go-chassis/go-chassis
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/go-chassis/go-chassis/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/go-chassis/go-chassis
- cd $HOME/gopath/src/github.com/go-chassis/go-chassis
jobs:
include:
- stage: Format Checker
script: bash scripts/travis/formatChecker.sh
- stage: DeadCode Checker
script:
- go get -u github.com/tsenart/deadcode
- bash scripts/travis/deadCodeChecker.sh
- stage: Misspell Checker
script:
- go get -u github.com/client9/misspell/cmd/misspell
- bash scripts/travis/misspellChecker.sh
- stage: GoConst Checker
script:
- go get -u github.com/jgautheron/goconst/cmd/goconst
- bash scripts/travis/goConstChecker.sh
- stage: GoLint Checker
script:
- go get -u golang.org/x/lint/golint
- bash scripts/travis/goLintChecker.sh
- stage: GoCyclo Checker
script:
- go get github.com/fzipp/gocyclo
- bash scripts/travis/goCycloChecker.sh
- stage: Unit Test
script:
- bash scripts/travis/start_latest_sc.sh
- go get github.com/stretchr/testify
- 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 scripts/travis/unit_test.sh && $HOME/gopath/bin/goveralls -coverprofile=coverage.txt -service=travis-ci
- stage: Build
script:
- GO111MODULE=on go mod download
- GO111MODULE=on go mod vendor
- go build -o chassis