forked from containers/virtcontainers
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
71 lines (65 loc) · 2.94 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
language: go
sudo: required
go:
- 1.7
- 1.8
- tip
env:
- COVERALLS_TOKEN=3NUr5Z9zvjIoGRlKi6WIA3Q9em3x22rZp
before_install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- go get github.com/pierrre/gotestcover
- go get github.com/fzipp/gocyclo
- go get github.com/gordonklaus/ineffassign
- go get github.com/golang/lint/golint
- go get github.com/client9/misspell/cmd/misspell
- go get github.com/01org/ciao/test-cases
- go get github.com/opencontainers/runc/libcontainer/configs
install:
- mkdir -p $HOME/build
- pushd $HOME/build
- git clone https://github.com/containernetworking/cni.git
- cd cni
- "./build"
- sudo mkdir -p /tmp/cni/bin
- sudo cp ./bin/bridge /tmp/cni/bin/cni-bridge
- sudo cp ./bin/loopback /tmp/cni/bin/loopback
- sudo cp ./bin/host-local /tmp/cni/bin/host-local
- popd
- mkdir -p $HOME/build_hook
- pushd $HOME/build_hook
- sudo mkdir -p /tmp/bin
- go build -o hook $GOPATH/src/github.com/containers/virtcontainers/hook/mock/hook.go
- sudo cp hook /tmp/bin/
- popd
- sudo mkdir -p /etc/cni/net.d
- sudo cp $GOPATH/src/github.com/containers/virtcontainers/test/cni/10-mynet.conf
/etc/cni/net.d/
- sudo cp $GOPATH/src/github.com/containers/virtcontainers/test/cni/99-loopback.conf
/etc/cni/net.d/
- sudo mkdir -p /opt/cni/bin
- sudo cp /tmp/cni/bin/cni-bridge /opt/cni/bin/
- sudo cp /tmp/cni/bin/loopback /opt/cni/bin/
- sudo cp /tmp/cni/bin/host-local /opt/cni/bin/
- go get -t -v ./...
script:
- go env
- go list ./... | xargs -t misspell
- go list ./... | xargs -t go vet
- if [[ "$TRAVIS_GO_VERSION" != "tip" ]] ; then go list ./... | xargs -tL 1 golint
-set_exit_status ; fi
- go list ./... | xargs go list -f '{{.Dir}}/*.go' | xargs -I % bash -c "misspell
-error %"
- go list ./... | xargs go list -f '{{.Dir}}' | xargs gocyclo -over 15
- go list ./... | xargs go list -f '{{.Dir}}' | xargs -L 1 ineffassign
- go list ./... | xargs go list -f '{{.Dir}}' | xargs gofmt -s -l | wc -l | xargs
-I % bash -c "test % -eq 0"
- go build ./...
- export GOROOT=`go env GOROOT` && sudo -E PATH=$PATH:$GOROOT/bin:/tmp/cni/bin $GOPATH/bin/test-cases
-v -timeout 9 -short -coverprofile /tmp/cover.out github.com/containers/virtcontainers/...
after_success:
- "$GOPATH/bin/goveralls -service=travis-ci -coverprofile=/tmp/cover.out"
notifications:
slack:
secure: ZZrkxKslIWyb4hoTfsKNNPayP1RVNMMm0z2HiYLE/hFXSg8kY01cnPMHUsVya//qw1J/t8O0jCByM7/nQrXEYPhKuU4cBt+hniZu8UL7aG4aBiTpimz5AlQ9mZA2DsnWkAGbYX0NZx1K8avD0jl4hzJFap4SAS+ZRLQun7QgzDu7VlAiu1YXEjjN1c22sFJzYJc+7Sl3r3KdLbsjAGWcJeOoiJRHJlWyxUyi8Z9MQfZnb2/tjChqZxi6f3HWDD2X2YReMhxUDcEuuntj0HHFXZnWsdDZOQgzB5jfnhR73fGwoEA3A7mswToF9NZbY57jbadQ5cO/1WguZD4sCIrtmuWbrvgwHMmyJUnhrh9t3S6J4aNu+cj8HV3eMddHOiEpi1/wb2lOXVBhltrynardGsLmy8gIGKo22yjovViwdtjF9vrcBqbzMGMK/bWLaprS3/TQ0VgHh3cgF/NiiVG9CULr8P9Zp8SMM0iu91pIzqw2BiunmczJ7L+bmKpDUvA1wMoyFHzKArfr0l2jAHJC5ptbNlZg3hIDI4xff633nnEWvHUK0j5tgz0aafqpW8NudO8FzgKXGvNHBoTRsbzGup9KIVECsl+J5rSW5gV9fNL4GB+J7H+xj0j7JNrACy2ept/Wi9UyosdN1On6NFiw5ucf71MJeaiS5g+xZqdrIuo=