forked from lcache/lcache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (31 loc) · 1.03 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
language: php
branches:
# Only test the master branch and SemVer tags.
only:
- master
- /^v*[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+.*$/
php:
- 5.6
- 7.0
sudo: false
cache:
directories:
- vendor
- $HOME/.composer/cache
before_script:
- echo 'apc.enable_cli=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- pear config-set preferred_state beta
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then (yes | pecl install apcu) ; else (echo "no\nno" | pecl install channel://pecl.php.net/apcu-4.0.11) ; fi
- phpenv rehash
- composer install
script:
- vendor/bin/phpcs --standard=PSR2 -n src
- vendor/bin/phpcs --standard=PSR2 -n tests
- vendor/bin/phpunit
after_success:
# Publish updated API documentation on every push to the master branch
- git config --global user.email $GITHUB_USER_EMAIL
- git config --global user.name "Travis LCache Documentation Bot"
- build/scripts/publish-api-docs.sh
# Generate coveralls code coverage
- travis_retry php vendor/bin/coveralls -v