forked from AliyunContainerService/pouch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (63 loc) · 1.97 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
68
69
70
71
72
73
74
dist: trusty
sudo: required
language: go
go:
- 1.10.4
go_import_path: github.com/alibaba/pouch
before_install:
|
echo $TRAVIS_COMMIT_RANGE
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)' || {
echo "travis does not run for document-only changed"
exit
}
notifications:
webhooks:
urls:
- http://47.96.190.121:6789/ci_notifications
on_failure: always
on_error: always
env:
- TEST_SUITE=unittest
- TEST_SUITE=integrationtest
- TEST_SUITE=criv1alpha1test
- TEST_SUITE=criv1alpha2test
- TEST_SUITE=nodee2etest
script: |
set -e # fast fail
if [[ "${TEST_SUITE}" = "unittest" ]]; then
sudo env "PATH=$PATH" hack/install/install_ci_related.sh
make unit-test
make coverage
elif [[ "${TEST_SUITE}" = "integrationtest" ]]; then
make build
make build-daemon-integration
TEST_FLAGS= make build-integration-test
sudo env "PATH=$PATH" make install
sudo env "PATH=$PATH" make download-dependencies
sudo env "PATH=$PATH" make integration-test
make coverage
elif [[ "${TEST_SUITE}" = "criv1alpha1test" ]]; then
make build
TEST_FLAGS= BUILDTAGS="selinux seccomp apparmor" make build-daemon-integration
sudo env "PATH=$PATH" make install
sudo env "PATH=$PATH" make download-dependencies
sudo env "PATH=$PATH" make cri-v1alpha1-test
make coverage
elif [[ "${TEST_SUITE}" = "criv1alpha2test" ]]; then
make build
TEST_FLAGS= BUILDTAGS="selinux seccomp apparmor" make build-daemon-integration
sudo env "PATH=$PATH" make install
sudo env "PATH=$PATH" make download-dependencies
sudo env "PATH=$PATH" make cri-v1alpha2-test
make coverage
else
make build
TEST_FLAGS= make build-daemon-integration
sudo env "PATH=$PATH" make install
sudo env "PATH=$PATH" make download-dependencies
sudo env "PATH=$PATH" make cri-e2e-test
make coverage
fi
after_success:
- bash <(curl -s https://codecov.io/bash) -cF ${TEST_SUITE} -y .codecov.yml