graphql-php/.travis.yml

66 lines
2.0 KiB
YAML
Raw Normal View History

dist: trusty
2018-06-16 01:04:32 +03:00
language: php
php:
2016-11-01 13:39:52 +03:00
- 7.1
2018-03-09 17:03:52 +03:00
- 7.2
- nightly
matrix:
allow_failures:
- php: nightly
cache:
directories:
- $HOME/.composer/cache
before_install:
2018-06-16 01:04:32 +03:00
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- travis_retry composer self-update
install:
- composer require react/promise:2.*
2017-08-15 17:56:21 +03:00
- composer require psr/http-message:1.*
2018-06-16 01:04:32 +03:00
- travis_retry composer update --prefer-dist
script: ./vendor/bin/phpunit --group default,ReactPromise
jobs:
allow_failures:
- php: nightly
include:
- stage: Test
env: DEPENDENCIES=low
install:
- travis_retry composer update --prefer-dist --prefer-lowest
- stage: Test
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:
- ./vendor/bin/phpunit --coverage-clover clover.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover clover.xml
2018-06-16 00:49:40 +03:00
- stage: Pull request coding standard
if: type = pull_request
install: travis_retry composer install --prefer-dist
script:
- |
if [ $TRAVIS_BRANCH != "master" ]; then
git remote set-branches --add origin $TRAVIS_BRANCH;
git fetch origin $TRAVIS_BRANCH;
fi
- git merge-base origin/$TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_SHA || git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge --unshallow
- wget https://github.com/diff-sniffer/git/releases/download/0.1.0/git-phpcs.phar
- php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA
# - stage: Coding standard
# if: NOT type = pull_request
# php: 7.1
# install: travis_retry composer install --prefer-dist
# script:
# - ./vendor/bin/phpcs