-
Notifications
You must be signed in to change notification settings - Fork 80
/
.travis.yml
57 lines (43 loc) · 2.01 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
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
- LOCAL_IP=$(ifconfig | grep inet | head -1 | awk '{print $2}' | cut -d':' -f2)
- IMAGE_TAG="noobaa-${TRAVIS_COMMIT}"
- TESTER_TAG="noobaa-tester-${TRAVIS_COMMIT}"
- NO_CACHE="NO_CACHE=true"
- SUPPRESS_LOGS="SUPPRESS_LOGS=true"
- DEPLOY_MINIKUBE_REDIRECT="/dev/null"
- PR_TITLE=$(curl https://github.com/${TRAVIS_REPO_SLUG}/pull/${TRAVIS_PULL_REQUEST} 2> /dev/null | grep "title" | head -1)
matrix:
include:
- language: generic
name: "Unit Tests"
services:
- docker
before_install:
# When the PR headline contains the string "dbg" it will run in dbg mode:
# Will not call to "SUPPRESS_LOGS=true"
- if [[ "${PR_TITLE}" =~ "dbg" ]] ; then export export SUPPRESS_LOGS=" " ; fi
script:
- make tester ${NO_CACHE} ${SUPPRESS_LOGS} || exit 1
- make test ${SUPPRESS_LOGS}
- language: node_js
node_js:
- "14"
name: "Build & Sanity Integration Tests"
sudo: required
dist: xenial #seems like running trusty fails minukube deployment
before_install:
# When the PR headline contains the string "dbg" it will run in dbg mode:
# Will not call to "SUPPRESS_LOGS=true, and will not redirect the output of deploy_minikube.sh"
- if [[ "${PR_TITLE}" =~ "dbg" ]] ; then export export SUPPRESS_LOGS=" " ; export DEPLOY_MINIKUBE_REDIRECT="/dev/stdout" ; fi
install:
- "./.travis/deploy_minikube.sh 1 >& ${DEPLOY_MINIKUBE_REDIRECT}"
script:
- make tester NOOBAA_TAG=${IMAGE_TAG} TESTER_TAG=${TESTER_TAG} ${NO_CACHE} ${SUPPRESS_LOGS} || exit 1
- "cd ./src/test/framework/ && ./run_test_job.sh --name ${TRAVIS_COMMIT} --image ${IMAGE_TAG} --tester_image ${TESTER_TAG} --job_yaml ../../../.travis/travis_test_job.yaml --wait"