forked from douyu/jupiter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (27 loc) · 818 Bytes
/
.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
language: go
dist: xenial
sudo: required
services:
- mysql
- redis-server
- docker
go:
- 1.13.x
- 1.14.x
env:
- GO111MODULE=on
before_install:
- go get golang.org/x/tools/cmd/goimports
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
- docker pull xieyanze/etcd3
- docker run -d -p 127.0.0.1:2379:2379 xieyanze/etcd3
- wget https://github.com/etcd-io/etcd/releases/download/v3.4.10/etcd-v3.4.10-linux-amd64.tar.gz
- tar xvf etcd-v3.4.10-linux-amd64.tar.gz
script:
- etcd-v3.4.10-linux-amd64/etcdctl put "/hello" "jupiter"
- etcd-v3.4.10-linux-amd64/etcdctl get "/hello"
- diff -u <(echo -n) <(gofmt -d -s .)
# - diff -u <(echo -n) <(goimports -d .)
- go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic
after_success:
- bash <(curl -s https://codecov.io/bash)