Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexilee committed Oct 6, 2018
1 parent 34c9d25 commit 5330191
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: go # 声明构建语言环境
sudo: false # 开启基于容器的Travis CI任务,让编译效率更高。

notifications: # 每次构建的时候是否通知,如果不想收到通知,那就设置false吧(email: false)
email:
recipients:
- hexileee@gmail.com
on_success: change
on_failure: always

go:
- "1.11"

install:
- go build
- go get github.com/mattn/goveralls


script: # 集成脚本
- go test -bench=.
- go test ./... -v -cover -race -coverprofile=go.coverprofile
- goveralls -coverprofile=go.coverprofile -service=travis-ci -repotoken=$COVERALLS_TOKEN

after_success:
- bash <(curl -s https://codecov.io/bash)

env: #env环境变量设置,travis提供的repo_token安全方式
global:
secure: "VfYSWjT/vD/EtNQ9EdXLi17fxVq2C0VYMQgkJQPPRDpwAJq1nruTGX+2IhjXidRx2xXaFVDXxXza+OnzFjW0+6NSlErnIg/vl8cDcIr386Em218yHcD4oTZhdnIbMhku3y3jziITtzSx07dbPndo6mmnEiidYODXteNq7i5qQWoZNcJi0TDe2mdK2QJzpS2p9y1Y1Au87yfO7/JtWd5WoFb6PRAMZsCSwXUD3VJoSS9WBT3bUEE+M3hPnPn+XFvzFUi3FL60ia9eoUPgJUS3cYg7BFBBjQg3shBqo6uIZTMDaDFQoTSpy2sJi90hLl/rKOfXFWuEYGRlMLNUcP+OYYFsQQN/obBPRLSOR7x4lnJq5Cw7zMdfj8nxtF6c4RAPgagSREXJpqw9G8KuxQx6HkObn+DdmR8AQdPPX9ok8lvmAjnPRpn9OWKntXH6rB/Mr+fkIrMsnrJDLfB97pV6SvNYBeSpN2jWZrvg0G3oc8g/xVKOThq0UNNlBqv02OwSgRtJbEmi8Xa7cG+WA/W+YYjmZXCqHtDsZBfOKR3laENAAh4PRYz0DnO6R30KJqZHyOaLgOxDIkdiXvPo3dkh8uNS7BFr/IKMScmXLssxKETlHGd1FMSWabxLGyjFOg0vyuRJ5wikYz7PtqfNb5Kuxo9dsl2oLjg8YD83Sx7uKQE="
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[![Coverage Status](https://coveralls.io/repos/github/Hexilee/gotten/badge.svg)](https://coveralls.io/github/Hexilee/gotten)
[![Go Report Card](https://goreportcard.com/badge/github.com/Hexilee/gotten)](https://goreportcard.com/report/github.com/Hexilee/gotten)
[![Build Status](https://travis-ci.org/Hexilee/gotten.svg?branch=master)](https://travis-ci.org/Hexilee/gotten)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Hexilee/gotten/blob/master/LICENSE)
[![Documentation](https://godoc.org/github.com/Hexilee/gotten?status.svg)](https://godoc.org/github.com/Hexilee/gotten)

#### Usage

```go
Expand Down

0 comments on commit 5330191

Please sign in to comment.