-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
38 lines (31 loc) · 1.3 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
sudo: required
language: go
os: linux
services:
- docker
go:
- 1.8
install:
- sudo mkdir -p /var/log/pods/
- sudo chown -R travis:travis /var/log/pods/
- curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
- mkdir -p .bin; mv ./kubectl .bin/kubectl && chmod +x .bin/kubectl
- export PATH="$TRAVIS_BUILD_DIR/.bin:$PATH"
- wget https://cdn.rawgit.com/Mirantis/kubeadm-dind-cluster/master/fixed/dind-cluster-v1.7.sh && chmod +x dind-cluster-v1.7.sh && ./dind-cluster-v1.7.sh up
- export PATH="$HOME/.kubeadm-dind-cluster:$PATH"
before_script:
# Download kubectl, which is a requirement for using minikube.nd}{end}'; until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do sleep 1; done
- go get k8s.io/client-go/...
- go get github.com/stretchr/testify/assert
script:
# - go vet .
- go test -race -coverprofile=test.out .
- cat test.out >> coverage.txt
- go test -race -coverprofile=test.out ./hack/test
- cat test.out >> coverage.txt
- kubectl get nodes
- kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/examples/storage/redis/redis-controller.yaml
- kubectl get rc
- kubectl get pods
after_success:
- bash <(curl -s https://codecov.io/bash)