-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.travis.yml
More file actions
51 lines (43 loc) · 1.36 KB
/
.travis.yml
File metadata and controls
51 lines (43 loc) · 1.36 KB
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
language: php
sudo: false
dist: trusty
php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- nightly
- hhvm
matrix:
fast_finish: true
allow_failures:
- php: nightly
- php: hhvm
before_install:
# Add Redis & Memcached extensions
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Memcache to be removed in when PHP 5 is dropped
- |
if [[ $TRAVIS_PHP_VERSION =~ ^5 ]]; then
echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
fi
# Remove PHP CS Fixer for PHP 5.5 since it requires PHP 5.6
- if [[ $TRAVIS_PHP_VERSION == "5.5" || $TRAVIS_PHP_VERSION == "nightly" || $TRAVIS_PHP_VERSION == "hhvm" ]]; then composer remove friendsofphp/php-cs-fixer --dev --no-update; fi
before_script:
- composer self-update || true
- composer install
script:
# PHPUnit
- vendor/bin/phpunit --coverage-clover=coverage.xml
# PHP CodeSniffer
- vendor/bin/phpcs -p --report=summary
# PHP CS Fixer (if >=5.6)
- if [[ $TRAVIS_PHP_VERSION != "5.5" && $TRAVIS_PHP_VERSION != "nightly" && $TRAVIS_PHP_VERSION != "hhvm" ]]; then vendor/bin/php-cs-fixer fix --dry-run; fi
after_success:
- bash <(curl -s https://codecov.io/bash)
cache:
directories:
- vendor
- $COMPOSER_CACHE_DIR