github.com/Go-GraphQL-Group/GraphQL-Service@v0.0.0-20181226133140-0967350219a7/.travis.yml (about) 1 language: go # 声明构建语言环境 2 sudo: false # 开启基于容器的Travis CI任务,让编译效率更高。 3 4 notifications: # 每次构建的时候是否通知,如果不想收到通知,那就设置false吧(email: false,也可以是Slack) 5 # slack: xxxx:xxxxxxxxxx 6 email: 7 recipients: 8 - 15989067460@163.com 9 on_success: change 10 on_failure: always 11 12 go: 13 - 1.11 14 15 install: #依赖安装 16 - go get github.com/go-playground/overalls #overalls能够支持到各级子目录 17 - go get github.com/mattn/goveralls #goveralls是coveralls对golang的测试覆盖率支持命令 18 - go get github.com/smartystreets/goconvey #很好用的测试工具 19 - go get github.com/Go-GraphQL-Group/GraphQL-Service 20 script: # 集成脚本 21 - cd $GOPATH/src/github.com/Go-GraphQL-Group/GraphQL-Service 22 - go build 23 - go test -v ./test/... -covermode=count -coverprofile=coverage.out -coverpkg="github.com/Go-GraphQL-Group/GraphQL-Service/..." 24 - $GOPATH/bin/goveralls -v -coverprofile=coverage.out -service=travis-ci 25 # - $GOPATH/bin/overalls -project=github.com/Go-GraphQL-Group/GraphQL-Service -covermode=count -ignore='.git,_vendor' 26 # - $GOPATH/bin/goveralls -coverprofile=overalls.coverprofile -service=travis-ci -repotoken $COVERALLS_TOKEN 27 # - go test -race -coverprofile=coverage.txt -covermode=atomic 28 29 after_success: 30 - bash <(curl -s https://codecov.io/bash) 31 32 # env: #env环境变量设置,travis提供的repo_token安全方式 33 # global: 34 # secure: "xxxx"