forked from diablomedia/doctrine1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (79 loc) · 2.58 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
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
- vendor
env:
global:
- COMPOSER_ARGS=""
- CC_TEST_REPORTER_ID=f424c3957298b215ddff899f624b534dac452ed703b42f70b74188a2edf0b5d0
- COMPOSER_DISCARD_CHANGES=1
- APCU_PECL_VERSION="apcu"
- APCU_BC_PECL_VERSION="apcu_bc"
install:
- echo "yes\nno\n" | pecl install -f $APCU_PECL_VERSION && sed -i 's/extension="apcu.so"//' ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- if [[ $APCU_BC_PECL_VERSION != '' ]]; then
pecl install -f $APCU_BC_PECL_VERSION ;
sed -i 's/extension="apc.so"//' ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ;
phpenv config-add apcu_bc.ini ;
else
phpenv config-add apcu.ini ;
fi ;
- phpenv rehash
- travis_retry composer install --no-interaction --prefer-source $COMPOSER_ARGS
stages:
- style check
- static analysis
- test
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- cd tests
- php run.php --coverage=clover
- cd ..
after_success:
- bash <(curl -s https://codecov.io/bash) -f tests/coverage/clover.xml
after_script:
- cp tests/coverage/clover.xml ./clover.xml
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
jobs:
fast_finish: true
allow_failures:
- php: 7.4snapshot
- php: nightly
include:
- php: 5.6
env:
- APCU_PECL_VERSION="apcu-4.0.11"
- APCU_BC_PECL_VERSION=""
- php: 7
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4snapshot
env: COMPOSER_ARGS="--ignore-platform-reqs"
- php: nightly
env: COMPOSER_ARGS="--ignore-platform-reqs"
- stage: style check
php: 7.2
before_script: skip
script:
- ./vendor/bin/php-cs-fixer fix --dry-run -vv
after_script: skip
after_success: skip
- stage: static analysis
php: 7.2
install:
- travis_retry composer install --no-interaction --prefer-source $COMPOSER_ARGS
- travis_retry composer require --update-with-dependencies --prefer-dist --no-suggest phpstan/phpstan:0.9.2
- travis_retry composer require --update-with-dependencies --prefer-dist --no-suggest vimeo/psalm:1.1.9
before_script:
- phpenv config-rm xdebug.ini || return 0;
script:
- ./vendor/bin/phpstan analyze --level 7 -c phpstan.neon --memory-limit=768M ./lib/
- ./vendor/bin/psalm --show-info=false
after_script: skip
after_success: skip