forked from area17/twill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (44 loc) · 1.22 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
dist: xenial
language: php
php:
- 7.1
- 7.2
- 7.3
- 7.4
- nightly
#### PHP 7.4 && PHP 8
## Faker is not yet compatible
## https://github.com/fzaninotto/Faker/pull/1816/files
matrix:
allow_failures:
- php: nightly
# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false
## Cache composer
cache:
directories:
- $HOME/.composer/cache
install:
- yes '' | pecl install imagick
- composer validate --strict
- travis_retry composer update --no-interaction --prefer-dist
script:
- vendor/bin/php-cs-fixer --dry-run --config=./.php_cs.travis fix src/ tests/ || travis_terminate 1;
- |
if [[ "$TRAVIS_PHP_VERSION" == '7.1' ]]; then
vendor/bin/phpunit --configuration phpunit-7.1.xml
else
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
fi
after_script:
- |
if [[ "$TRAVIS_PHP_VERSION" == '7.4' ]]; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi
- |
LOG_FILE=${TRAVIS_BUILD_DIR}/tests/storage/logs/laravel.log
if [[ -f "$LOG_FILE" ]]; then
cat $LOG_FILE
fi