forked from openebs-archive/node-disk-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (58 loc) · 2.1 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
dist: xenial
language: go
go:
- 1.12.7
env:
global:
- ARCH=$(go env GOARCH)
- TAG="ci"
- CODECOV_TOKEN="d1e39bea-f800-45de-8266-3e9b85e2594a"
sudo: required
services:
- docker
addons:
apt:
update: true
install:
- make bootstrap
- sudo apt-get install --yes libudev-dev
- if [ "$TRAVIS_BUILD_DIR" != "$GOPATH/src/github.com/openebs/node-disk-manager" ]; then
mkdir -p $GOPATH/src/github.com/openebs/;
mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/openebs;
cd $GOPATH/src/github.com/openebs/node-disk-manager;
fi
- curl -Lo minikube https://storage.googleapis.com/minikube/releases/v1.0.0/minikube-linux-amd64
- sudo chmod +x minikube
- sudo mv minikube /usr/local/bin/
# we need openSeaChest repo to build node-disk-manager
- pushd .
- cd ..
# Hotfix-Makefile_fix is the Release-19.06 with certain fixes in Makefile
- git clone --recursive --branch Release-19.06.02 https://github.com/openebs/openSeaChest.git
- cd openSeaChest/Make/gcc
- make release
- cd ../../
- sudo cp opensea-common/Make/gcc/lib/libopensea-common.a /usr/lib
- sudo cp opensea-operations/Make/gcc/lib/libopensea-operations.a /usr/lib
- sudo cp opensea-transport/Make/gcc/lib/libopensea-transport.a /usr/lib
- popd
before_script:
- sudo minikube start --vm-driver=none
- sudo minikube update-context
# By default root is the owner of the .minikube directory. This is changed to $USER so that
# from the integration tests which run as a non-root user can access the files and connect
# to the minikube cluster
- sudo chown -R $USER $HOME/.minikube
- sudo chown -R $USER $HOME/.kube
script:
- make shellcheck
- make
# Here sudo -E env "PATH=$PATH" make test is required for running tests with
# sudo permissions since we are making use of scsi device mockdata in smartprobe_test
# which could be fetched for a SCSI device with sudo permissions only since to access
# a particular scsi device, sudo or root permissions are required.
- sudo -E env "PATH=$PATH" make test
- make integration-test
after_success:
- make push
- bash <(curl -s https://codecov.io/bash)