Skip to content

Instantly share code, notes, and snippets.

@makasim
Forked from mkorkmaz/.travis.yml
Created November 24, 2017 09:16
Show Gist options
  • Save makasim/827831f5c14bc545ce14a64a0bb5f899 to your computer and use it in GitHub Desktop.
Save makasim/827831f5c14bc545ce14a64a0bb5f899 to your computer and use it in GitHub Desktop.
Testing your code with Elasticseach 2 on TravisCI
language: php
sudo: false
jdk:
- oraclejdk8
addons:
apt:
packages:
- oracle-java8-installer
php:
- 7.0
- 5.6
env:
global:
- WAIT_FOR_ES=1
matrix:
- ES_VERSION=2.3.3
install:
- mkdir /tmp/elasticsearch
- wget -O - https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/${ES_VERSION}/elasticsearch-${ES_VERSION}.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1
- /tmp/elasticsearch/bin/elasticsearch --daemonize --path.data /tmp
before_script:
- composer install -n
- sleep 10
- curl http://127.0.0.1:9200/
script:
- vendor/bin/phpunit
after_script:
- if [ $TRAVIS_PHP_VERSION = '7.0' ]; then php vendor/bin/coveralls; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment