-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
40 lines (35 loc) · 1.83 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
language: go
go:
- "1.10"
# let us have speedy Docker-based Travis workers
sudo: false
before_script:
# - ci/travis_etcd.sh 3.0.12
- ci/travis_zk.sh 3.5.1-alpha
script:
- cd $GOPATH; mkdir -p build; cd build; git clone https://github.com/coreos/etcd.git
- cd etcd;git checkout v3.3.1;./build
- ln -s $GOPATH/build/etcd/cmd/vendor $GOPATH/build/src
- mv $GOPATH/src/github.com/YuleiXiao $GOPATH/build/src/github.com
- cd $GOPATH/build; export GOPATH=`pwd`; export PATH=$GOPATH/bin:$PATH
- cd $GOPATH/src/github.com/YuleiXiao/kvstore
- go get -t -v ./...
- go get github.com/golang/lint/golint
- go get github.com/mattn/goveralls
- go get github.com/GeertJohan/fgt
- $GOPATH/src/github.com/coreos/etcd/bin/etcd --listen-client-urls 'http://0.0.0.0:2379' --advertise-client-urls 'http://127.0.0.1:2379' >/dev/null 2>&1 &
- ./zk/bin/zkServer.sh start ./zk/conf/zoo.cfg 1> /dev/null
- sleep 5
- echo very-secure|ETCDCTL_API=3 $GOPATH/src/github.com/coreos/etcd/bin/etcdctl --endpoints=localhost:2379 user add --interactive=false test
- echo root|ETCDCTL_API=3 $GOPATH/src/github.com/coreos/etcd/bin/etcdctl --endpoints=localhost:2379 user add --interactive=false root
- ETCDCTL_API=3 $GOPATH/src/github.com/coreos/etcd/bin/etcdctl --endpoints=localhost:2379 role add root
- ETCDCTL_API=3 $GOPATH/src/github.com/coreos/etcd/bin/etcdctl --endpoints=localhost:2379 user grant-role root root
- ETCDCTL_API=3 $GOPATH/src/github.com/coreos/etcd/bin/etcdctl --endpoints=localhost:2379 user grant-role test root
- ETCDCTL_API=3 $GOPATH/src/github.com/coreos/etcd/bin/etcdctl --endpoints=localhost:2379 auth enable
- cd $GOPATH/src/github.com/YuleiXiao/kvstore
- fgt gofmt -s -d -l .
- go vet ./...
- fgt golint ./...
- go test -v -race ./...
- ci/coverage.sh
- goveralls -service=travis-ci -coverprofile=goverage.report