This repository has been archived by the owner on May 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (62 loc) · 2.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
language: php
sudo: false
php:
- 7.1
os: linux
env:
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""
cache:
directories:
- $TRAVIS_BUILD_DIR/resources
- $HOME/.composer/cache
stages:
- composer validate
- check coding style
- static code analysis
- test
- test with coverage
before_install:
- phpenv config-rm xdebug.ini || echo "xdebug not available"
- echo 'opcache.enable=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'opcache.enable_cli=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- travis_retry composer self-update
install: travis_retry composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction -vv $COMPOSER_FLAGS
script: vendor/bin/phpunit -c phpunit.xml.dist --no-coverage --colors --verbose
jobs:
fast_finish: true
allow_failures:
- php: 7.2
- php: nightly
include:
- php: 7.2
env: COMPOSER_FLAGS="--ignore-platform-reqs"
- php: nightly
env: COMPOSER_FLAGS="--ignore-platform-reqs"
- stage: test with coverage
php: 7.1
env:
- COVERAGE=yes
- COMPOSER_FLAGS=""
before_install:
- echo 'opcache.enable=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'opcache.enable_cli=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- travis_retry composer self-update
script: vendor/bin/phpunit -c phpunit.xml.dist --colors --verbose --coverage-text --coverage-clover=coverage.clover
after_success:
- bash <(curl -s https://codecov.io/bash) -f coverage.clover -F phpunit
- stage: composer validate
php: 7.1
install: skip
# do not use the "--strict" option, it will break the build if "dev-master" is used in a direct dependency
script: composer validate
- stage: check coding style
php: 7.1
env: COMPOSER_FLAGS=""
script:
- vendor/bin/phpcs
- php -n -d memory_limit=768M vendor/bin/php-cs-fixer fix --dry-run -vv
- stage: static code analysis
php: 7.1
env: COMPOSER_FLAGS=""
script: vendor/bin/phpstan analyse -l 7 -c phpstan.neon --autoload-file=vendor/autoload.php --memory-limit=768M --no-progress src tests