Repository navigation
Expand file tree
/
Copy path.travis.yml
More file actions
45 lines (36 loc) · 1.72 KB
/
Copy path.travis.yml
File metadata and controls
45 lines (36 loc) · 1.72 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
language: php
sudo: false
branches:
only:
- master
matrix:
include:
- php: '7.1'
#env: coverage=1
- php: '7.1'
env: lint=1
cache:
directories:
- $HOME/.composer/cache
before_install:
- phpenv config-rm xdebug.ini || echo "xdebug not available"
- if [[ $coverage = 1 ]]; then mkdir -p build/logs build/cov; fi
- if [[ $coverage = 1 ]]; then wget https://phar.phpunit.de/phpcov.phar; fi
- if [[ $coverage = 1 ]]; then wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar; fi
- if [[ $lint = 1 ]]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.3.2/php-cs-fixer.phar; fi
- if [[ $lint = 1 ]]; then composer global require phpstan/phpstan; fi
- export PATH="$PATH:$HOME/.composer/vendor/bin:./vendor/bin"
install:
- if [[ $coverage = 1 ]]; then composer require --dev --no-update 'phpunit/php-code-coverage:^4.0.1'; fi
- composer update --prefer-dist --no-progress --no-suggest --ansi
script:
- export SYMFONY_DEPRECATIONS_HELPER=strict
- if [[ $coverage = 1 ]]; then phpdbg -qrr -dmemory_limit=-1 vendor/bin/phpunit --verbose --coverage-php build/cov/coverage-phpunit.cov; fi
- if [[ $coverage = 1 ]]; then phpdbg -qrr phpcov.phar merge --clover build/logs/clover.xml build/cov; fi
- if [[ ! $lint ]]; then vendor/bin/phpunit --verbose; fi
- if [[ $lint = 1 ]]; then php php-cs-fixer.phar fix --dry-run --diff --no-ansi; fi
- if [[ $lint = 1 ]]; then phpstan analyse -c phpstan.neon -l5 --ansi src tests; fi
- cp config.php.dist config.php
- bin/hubkit.php self-diagnose
after_success:
- if [[ $coverage = 1 ]]; then travis_retry php coveralls.phar; fi