forked from voku/portable-utf8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (92 loc) · 3.08 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
language: php
sudo: false
php:
- nightly
os:
- linux
env:
global:
- PHP_COMPOSER_SETUP=basic
- PHP_EXTENSION=true
- PHP_MBSTRING_FUNC_OVERLOAD=false
git:
depth: 2
cache:
directories:
- $HOME/.composer/cache
matrix:
fast_finish: true
allow_failures:
- php: nightly
include:
- php: nightly
- php: 7.0
- php: 7.0
env:
- PHP_EXTENSION=false
- php: 7.0
env:
- PHP_COMPOSER_SETUP=lowest
- PHP_EXTENSION=false
- php: 7.1
- php: 7.1
env:
- PHP_EXTENSION=false
- php: 7.1
env:
- PHP_COMPOSER_SETUP=lowest
- PHP_EXTENSION=false
- php: 7.2
- php: 7.2
env:
- PHP_EXTENSION=false
- php: 7.2
env:
- PHP_COMPOSER_SETUP=lowest
- PHP_EXTENSION=false
- php: 7.3
- php: 7.3
env:
- PHP_EXTENSION=false
- php: 7.3
env:
- PHP_COMPOSER_SETUP=lowest
- PHP_EXTENSION=false
- php: 7.4
- php: 7.4
env:
- PHP_EXTENSION=false
- php: 7.4
env:
- PHP_COMPOSER_SETUP=lowest
- PHP_EXTENSION=false
install:
- stty cols 120
- TRAVIS_PHP_INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- MAIN_PHP_INI_FILE=~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "php-config -> orig"
- cat $TRAVIS_PHP_INI_FILE
- cat $MAIN_PHP_INI_FILE
- if [[ $PHP_EXTENSION = false ]]; then phpenv config-rm mbstring.ini || echo "mbstring not available"; fi
- if [[ $PHP_EXTENSION = false ]]; then phpenv config-rm intl.ini || echo "intl not available"; fi
- if [[ $PHP_EXTENSION = false ]]; then phpenv config-rm iconv.ini || echo "iconv not available"; fi
- if [[ $PHP_EXTENSION = true ]]; then phpenv config-add mbstring.ini || echo "mbstring not available"; fi
- if [[ $PHP_EXTENSION = true ]]; then phpenv config-add intl.ini || echo "intl not available"; fi
- if [[ $PHP_EXTENSION = true ]]; then phpenv config-add iconv.ini || echo "iconv not available"; fi
- if [[ $PHP_MBSTRING_FUNC_OVERLOAD = true ]]; then echo "mbstring.func_overload = 7" >> $TRAVIS_PHP_INI_FILE; fi
- echo "php-config -> new"
- cat $TRAVIS_PHP_INI_FILE
- cat $MAIN_PHP_INI_FILE
- wget https://scrutinizer-ci.com/ocular.phar
- travis_retry composer require --optimize-autoloader php-coveralls/php-coveralls
- if [ "$(phpenv version-name)" == 7.3 ]; then travis_retry composer require phpstan/phpstan; fi
- if [[ $PHP_COMPOSER_SETUP = 'basic' ]]; then travis_retry composer update --prefer-dist --no-interaction --optimize-autoloader; fi
- if [[ $PHP_COMPOSER_SETUP = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --optimize-autoloader --prefer-lowest --prefer-stable; fi
script:
- mkdir -p build/logs
- php vendor/bin/phpunit -c phpunit.xml --debug
- if [ "$(phpenv version-name)" == 7.3 ]; then php vendor/bin/phpstan analyse --memory-limit=-1; fi
after_script:
- php vendor/bin/php-coveralls -v
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- bash <(curl -s https://codecov.io/bash)