forked from overblog/GraphQLBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (57 loc) · 2.26 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
language: php
dist: trusty
sudo: false
git:
depth: 50
branches:
only:
- master
- annotations
- /^\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 [ "${SYMFONY_VERSION}" != "" ]; then perl -pi -e 's#"(symfony/.*)":\s*".*"#"$1":"'"${SYMFONY_VERSION}"'"#' composer.json; fi;
- if [ "${PHPUNIT_VERSION}" != "" ]; then composer req "phpunit/phpunit:${PHPUNIT_VERSION}" --dev --no-update; fi;
- if [ "${VALIDATOR}" = "0" ]; then composer remove "symfony/validator" --dev --no-update; fi;
- 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: composer test
jobs:
include:
- php: 7.4
env: SYMFONY_VERSION=4.4.*
- php: 7.4
env: SYMFONY_VERSION=5.0.*
- php: 7.4
env: SYMFONY_VERSION=5.1.*
- php: nightly
env: COMPOSER_UPDATE_FLAGS=--ignore-platform-reqs
- stage: Code Quality
php: 7.4
env: COVERAGE SYMFONY_VERSION=4.4.*
before_script:
- pecl install pcov
script: php -dpcov.enabled=1 bin/phpunit --color=always -v --debug --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
- composer require "satooshi/php-coveralls:^1.0" && travis_retry php bin/coveralls -v
- stage: Code Quality
php: 7.4
env: STATIC_ANALYSIS SYMFONY_VERSION=4.4.*
install: travis_retry composer install --prefer-dist
script: composer static-analysis
- stage: Code Quality
php: 7.4
env: CODING_STANDARDS
script: composer check-cs
- stage: Code Quality
php: 7.4
env: BENCHMARK
script: composer bench
allow_failures:
- php: nightly