| 1 |
sudo: required |
| 2 |
language: go |
| 3 |
go: |
| 4 |
- "1.10.x" |
| 5 |
- "1.11.x" |
| 6 |
- "1.12.x" |
| 7 |
#- tip |
| 8 |
env: |
| 9 |
- GO111MODULE=on |
| 10 |
- GO111MODULE=off |
| 11 |
matrix: |
| 12 |
allow_failures: |
| 13 |
- go: tip |
| 14 |
services: |
| 15 |
- docker |
| 16 |
before_install: |
| 17 |
# Install netcat |
| 18 |
- if [[ "$TRAVIS_OS_NAME" == "linux" && ! $(which nc) ]] ; then sudo apt-get install -y netcat ; fi |
| 19 |
- sudo sysctl -w vm.max_map_count=262144 |
| 20 |
- docker run --rm --privileged=true -p 9200:9200 -p 9300:9300 -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch:5.6.16 elasticsearch -Expack.security.enabled=false -Escript.inline=true -Escript.stored=true -Escript.file=true -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_ >& /dev/null & |
| 21 |
- go get -u github.com/fortytw2/leaktest |
| 22 |
- go get . ./aws/... ./config/... ./uritemplates/... |
| 23 |
# Wait for Elasticsearch |
| 24 |
- while ! nc -z localhost 9200; do sleep 1; done |
| 25 |
install: true |
| 26 |
script: |
| 27 |
- go test -race -v . ./aws/... ./config/... ./uritemplates/... |