1language: php
2
3services:
4  - docker
5
6branches:
7  except:
8    - 0.4
9
10sudo: true
11
12matrix:
13  fast_finish: true
14  include:
15    - php: 7.1
16      env: ES_VERSION="7.0.0"
17
18    - php: 7.2
19      env: ES_VERSION="7.0.0"
20
21    - php: 7.3
22      env: ES_VERSION="7.0.0"
23  allow_failures:
24    - php: 7.3
25      env: ES_VERSION="7.1.0"
26
27env:
28  global:
29    - ES_TEST_HOST=http://localhost:9200
30
31before_install:
32  - ./travis/run_es_docker.sh
33
34install:
35  - composer install --prefer-dist
36
37before_script:
38  - if [ $TRAVIS_PHP_VERSION = '7.3' ]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; fi
39  - php util/RestSpecRunner.php
40  - php util/EnsureClusterAlive.php
41
42script:
43  - if [ $TRAVIS_PHP_VERSION != '7.3' ]; then composer run-script phpcs; fi
44  - if [ $TRAVIS_PHP_VERSION = '7.1' ]; then composer run-script phpstan7.1; fi
45  - if [ $TRAVIS_PHP_VERSION = '7.2' ]; then composer run-script phpstan7.1; fi
46  - if [ $TRAVIS_PHP_VERSION = '7.3' ]; then composer run-script phpstan; fi
47  - vendor/bin/phpunit $PHPUNIT_FLAGS
48  - vendor/bin/phpunit -c phpunit-integration.xml --group sync $PHPUNIT_FLAGS
49
50after_script:
51  - if [ $TRAVIS_PHP_VERSION = '7.3' ]; then php vendor/bin/coveralls; fi
52
53notifications:
54  email: true
55