forked from osrg/gobgp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
230 lines (217 loc) · 5.76 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
language: go
_dep_ensure: &_dep_ensure
go: "1.11"
before_install: go get -u github.com/golang/dep/cmd/dep
install: $GOPATH/bin/dep ensure
_unittest: &_unittest
<<: *_dep_ensure
script:
- go test $([ $(go env GOARCH) == 'amd64' ] && echo '-race') $(go list ./... | grep -v '/vendor/') -timeout 120s
- if [ "$(go env GOARCH)" = "amd64" ]; then go test -race github.com/osrg/gobgp/pkg/packet/bgp -run ^Test_RaceCondition$; else echo 'skip'; fi
_build: &_build
<<: *_dep_ensure
script:
- go build -o ./cmd/gobgp/gobgp ./cmd/gobgp/
- go build -o ./cmd/gobgpd/gobgpd ./cmd/gobgpd/
_node_js: &_node_js
language: node_js
node_js: "node"
_python: &_python
language: python
python: "2.7"
_docker: &_docker
<<: *_python
sudo: required
dist: trusty
group: deprecated-2017Q4
before_install:
- test $TRAVIS_OS_NAME == "linux" && sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
- test $TRAVIS_OS_NAME == "linux" && sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
- test $TRAVIS_OS_NAME == "linux" && sudo sysctl -w net.ipv6.conf.docker0.disable_ipv6=1
install:
- pip install -r test/pip-requires.txt
- fab -f test/lib/base.py make_gobgp_ctn:tag=$DOCKER_IMAGE,from_image=$FROM_IMAGE
script:
- PYTHONPATH=test python test/scenario_test/$TEST --gobgp-image $DOCKER_IMAGE -x -s
services:
- docker
env:
global:
- DOCKER_IMAGE=gobgp
- FROM_IMAGE=osrg/quagga
matrix:
allow_failures:
- go: tip
include:
#
# Unit Tests
#
- <<: *_unittest
env:
- DESCRIPTION="Unit Tests Tip"
go: tip
- <<: *_unittest
env:
- DESCRIPTION="Unit Tests"
go: 1.11
- <<: *_unittest
env:
- DESCRIPTION="Tests + goreleaser + cover"
go: "1.11"
script:
- go test $(go list ./... | grep -v '/vendor/') -coverprofile=coverage.txt -covermode=atomic
after_success:
- test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash
- bash <(curl -s https://codecov.io/bash)
- <<: *_unittest
env:
- DESCRIPTION="Unit Tests on i386"
before_script:
- export GOARCH="386"
- go env
#
# Cross-compile
#
# Note: We use "before_script" to enable "go env" settings. The following keeps
# "env" sections as just markers of Travis-CI Web UI.
# See https://github.com/travis-ci/travis-ci/issues/6126
- <<: *_build
env:
- GOOS="openbsd"
before_script:
- export GOOS="openbsd"
- go env
- <<: *_build
env:
- GOOS="freebsd"
before_script:
- export GOOS="freebsd"
- go env
- <<: *_build
env:
- GOOS="darwin"
before_script:
- export GOOS="darwin"
- go env
#
# Misc
#
- <<: *_dep_ensure
env:
- DESCRIPTION="go fmt + vet + staticcheck"
before_script: go get -u honnef.co/go/tools/cmd/staticcheck
script:
- test -z "$(go fmt $(go list ./... | grep -v '/vendor/'))"
- go vet $(go list ./... | grep -v '/vendor/')
- staticcheck $(go list ./... | grep -v '/vendor/')
- <<: *_dep_ensure
env:
- DESCRIPTION="build_embeded_go.py"
script: python test/scenario_test/ci-scripts/build_embeded_go.py docs/sources/lib.md
#
# Docker
#
- <<: *_docker
env:
- TEST=bgp_router_test.py
- <<: *_docker
env:
- TEST=bgp_zebra_test.py
- <<: *_docker
env:
- TEST=bgp_zebra_nht_test.py FROM_IMAGE=osrg/quagga:v1.0
- <<: *_docker
env:
- TEST=evpn_test.py
- <<: *_docker
env:
- TEST=flow_spec_test.py
- <<: *_docker
env:
- TEST=global_policy_test.py
- <<: *_docker
env:
- TEST=graceful_restart_test.py
- <<: *_docker
env:
- TEST=ibgp_router_test.py
- <<: *_docker
env:
- TEST=route_reflector_test.py
- <<: *_docker
env:
- TEST=route_server_as2_test.py
- <<: *_docker
env:
- TEST=route_server_ipv4_v6_test.py
- <<: *_docker
env:
- TEST=route_server_malformed_test.py
- <<: *_docker
env:
- TEST=route_server_policy_grpc_test.py
- <<: *_docker
env:
- TEST=route_server_policy_test.py
- <<: *_docker
env:
- TEST=route_server_softreset_test.py
- <<: *_docker
env:
- TEST=route_server_test.py
- <<: *_docker
env:
- TEST=route_server_test2.py
- <<: *_docker
env:
- TEST=zapi_v3_test.py FROM_IMAGE=osrg/quagga:v1.0
- <<: *_docker
env:
- TEST=long_lived_graceful_restart_test.py
- <<: *_docker
env:
- TEST=vrf_neighbor_test.py
- <<: *_docker
env:
- TEST=vrf_neighbor_test2.py
- <<: *_docker
env:
- TEST=rtc_test.py
- <<: *_docker
env:
- TEST=bgp_unnumbered_test.py
- <<: *_docker
env:
- TEST=aspath_test.py
- <<: *_docker
env:
- TEST=addpath_test.py
- <<: *_docker
env:
- TEST=bgp_malformed_msg_handling_test.py
- <<: *_docker
env:
- TEST=bgp_confederation_test.py
#
# Tools
#
- <<: *_node_js
env:
- DESCRIPTION="markdownlint"
before_script:
- npm install -g markdownlint-cli
script:
- markdownlint $(find . -type f -name '*.md' | grep -v '/vendor/')
- <<: *_python
env:
- DESCRIPTION="Tools"
install: pip install scspell3k
script:
- bash tools/spell-check/scspell.sh
- bash tools/grep_avoided_functions.sh
cache:
pip: true
go_import_path: github.com/osrg/gobgp
notifications:
slack:
secure: KzuC9kytzS7wTlfj4MqSg8EpqXfJRMbo59dAVTA3w587achnVCS3vhUenWuhMCiWk7+6DVWwNpwzn2+A0S6RwMFMpKAU6Ij6K9sxEOgqBGuMN8w1//w+uJTryzsnebEIhInGt2kKfqz4Wx3QQqW5gVhI+8s+c5M0iXxFtN4soVk=