forked from onosproject/onos-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (41 loc) · 1.35 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
sudo: false
language: go
go:
- '1.12.x'
services:
- docker
notifications:
email: false
branches:
only:
- master
cache:
directories:
- $HOME/gopath/pkg/mod # Cache the Go modules
before_script:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest
jobs:
include:
- stage: tests
script: make coverage
- stage: integration-tests
if: type != pull_request
notifications:
email:
script:
# Download and install kubectl
- curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Download and install KinD
- GO111MODULE=on go get sigs.k8s.io/kind
- git checkout go.mod go.sum
- GO111MODULE=on go get github.com/onosproject/onos-test/cmd/onit
- git checkout go.mod go.sum
# Set KUBECONFIG environment variable
- export KUBECONFIG="$(kind get kubeconfig-path)"
- kind create cluster
- make integration