forked from TykTechnologies/tyk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (44 loc) · 1.59 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: required
language: go
notifications:
on_success: never
on_failure: always
env:
global:
- TYK_LOGLEVEL=info
- CONSUL_VERSION=1.4.4
- CONSUL_DIR=$HOME/consul_$CONSUL_VERSION
addons:
apt:
packages:
- python3-pip
matrix:
include:
- go: 1.12.x
services:
- redis-server
install:
- go get golang.org/x/tools/cmd/goimports
- go get github.com/wadey/gocovmerge
- go get github.com/mattn/goveralls
before_script:
- 'if [[ ! -f $CONSUL_DIR/consul ]]; then (mkdir -p "$CONSUL_DIR" && cd $CONSUL_DIR && wget https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip && unzip consul_${CONSUL_VERSION}_linux_amd64.zip); fi'
- $CONSUL_DIR/consul --version
- $CONSUL_DIR/consul agent --dev &
# Wait for consul's raft election
- sleep 5
script:
- pip3 install setuptools
- sudo pip3 install google
- sudo pip3 install protobuf
### Needed to convert the swagger 2.0 file to openapi 3.0
### The swagger docs are actually written as per the 2.0 spec as there is no
### support for openapi 3.0 in Go - at least for now.
### https://github.com/nodesource/distributions/blob/master/README.md#debinstall
- curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install nodejs
- sudo npm install -g api-spec-converter --unsafe-perm=true --allow-root
- go build -tags 'coprocess lua'
- ./bin/ci-tests.sh
- if [[ $LATEST_GO ]]; then goveralls -coverprofile=<(gocovmerge *.cov); fi
- ./bin/ci-benchmark.sh