forked from redhat-developer/service-binding-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (42 loc) · 1.75 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
go_import_path: github.com/redhat-developer/service-binding-operator
sudo: required
dist: xenial
language: go
go:
- 1.12.x
env:
global:
- CHANGE_MINIKUBE_NONE_USER=true
- MINIKUBE_WANTUPDATENOTIFICATION=false
- MINIKUBE_WANTREPORTERRORPROMPT=false
- MINIKUBE_HOME=$HOME
- CHANGE_MINIKUBE_NONE_USER=true
- KUBECONFIG=$HOME/.kube/config
- SDK_VERSION="0.8.1"
- MINIKUBE_VERSION="1.1.1"
- KUBE_VERSION="1.14.3"
- GO111MODULE=on
before_install:
# Install deps
- sudo apt-get install -y yamllint
# Download Operator SDK
- curl -Lo operator-sdk https://github.com/operator-framework/operator-sdk/releases/download/v${SDK_VERSION}/operator-sdk-v${SDK_VERSION}-x86_64-linux-gnu && chmod +x operator-sdk && mv operator-sdk $GOPATH/bin/
# Download kubectl
- curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBE_VERSION}/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download Minikube
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/v${MINIKUBE_VERSION}/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
# Create empty KUBECONFIG & Docker configuration files
- mkdir -p $HOME/.kube $HOME/.minikube $HOME/.docker && touch $KUBECONFIG && echo "{}" > $HOME/.docker/config.json
# Start Minikube
- sudo minikube start --vm-driver=none --kubernetes-version=v${KUBE_VERSION} --memory=6144
- "sudo chown -R travis: /home/travis/.minikube/"
before_script:
# Create a namespace for the operator testing
- kubectl create namespace operator-test
script:
# Run lint
- make lint
# Run unit tests
- go test -mod vendor $(go list ./...|grep -v e2e) -v
# Run e2e tests
- operator-sdk test local ./test/e2e --namespace=operator-test --up-local --go-test-flags "-v"