-
Notifications
You must be signed in to change notification settings - Fork 22
/
.travis.yml
62 lines (53 loc) · 1.85 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
language: php
env:
- TASK_TESTS_COVERAGE=0 XZ_EXT_REPO=https://github.com/codemasher/php-ext-xz
matrix:
fast_finish: true
include:
- php: 8.0
- php: 7.4
- php: 7.3
- php: 7.2
- php: 7.1
env: TASK_TESTS_COVERAGE=1 XZ_EXT_REPO=https://github.com/codemasher/php-ext-xz
- php: 7.0
- php: 5.6
env: TASK_TESTS_COVERAGE=0 XZ_EXT_REPO=https://github.com/payden/php-xz
install:
- |
if [[ $TASK_TESTS_COVERAGE != 1 ]]; then
# disable xdebug for performance reasons when code coverage is not needed. note: xdebug on hhvm is disabled by default
phpenv config-rm xdebug.ini || echo "xdebug is not installed"
fi
- sudo apt-get install p7zip-full
# install php-xz
- git clone $XZ_EXT_REPO /tmp/xz
- cd /tmp/xz && phpize && ./configure && make && sudo make install && cd -
- echo "extension=xz.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# install composer dependencies
- travis_retry composer self-update
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- travis_retry composer install
# Install old archive7z version (that don't work on <7.1)
- |
if [[ $TRAVIS_PHP_VERSION == 5.6 || $TRAVIS_PHP_VERSION == 7.0 ]]; then
composer require --no-interaction gemorroj/archive7z:4.0.0
else
composer require --no-interaction gemorroj/archive7z
fi
- composer require --no-interaction phpclasses/php-iso-file pear/archive_tar wapmorgan/cab-archive
- |
if [[ $TASK_TESTS_COVERAGE == 1 ]]; then
PHPUNIT_FLAGS="--coverage-clover=coverage.clover"
fi
script:
# PHP tests
- ./bin/cam -f
- ./bin/cam -D
- vendor/bin/phpunit --verbose $PHPUNIT_FLAGS
after_script:
- |
if [[ $TASK_TESTS_COVERAGE == 1 ]]; then
travis_retry wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi