-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
57 lines (46 loc) · 1.97 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
dist: trusty
language: php
git:
depth: 50
branches:
only:
- master
- /^\d+\.\d+$/
cache:
directories:
- $HOME/.composer/cache
- $HOME/.php_cs.cache
before_install:
- if [ "${STABILITY}" != "" ]; then perl -pi -e 's/^}$/,"minimum-stability":"'"${STABILITY}"'"}/' composer.json; fi;
- if [ "${PHPUNIT_VERSION}" != "" ]; then composer req "phpunit/phpunit:${PHPUNIT_VERSION}" --dev --no-update; fi;
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer selfupdate
- if [ $GRAPHQLPHP_VERSION ]; then composer require "webonyx/graphql-php:${GRAPHQLPHP_VERSION}" --dev --no-update; fi;
install: travis_retry composer update --prefer-source --no-interaction --optimize-autoloader ${COMPOSER_UPDATE_FLAGS}
script: bin/phpunit --color=always -v --debug
jobs:
include:
- stage: Test
- php: 7.1
- php: 7.1
env: COMPOSER_UPDATE_FLAGS=--prefer-lowest
- php: 7.2
- php: 7.3
- php: nightly
env: COMPOSER_UPDATE_FLAGS=--ignore-platform-reqs
- stage: Code Quality
php: 7.2
env: COVERAGE
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script: bin/phpunit --color=always -v --debug -d xdebug.max_nesting_level=1000 --coverage-clover=build/logs/clover.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar && travis_retry php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- stage: Code Quality
php: 7.2
env: CODING_STANDARDS
script: bin/php-cs-fixer fix --dry-run --diff -v --allow-risky=yes --ansi
allow_failures:
- php: nightly
env: COMPOSER_UPDATE_FLAGS=--ignore-platform-reqs