Skip to content

Commit

Permalink
Updated testing setup
Browse files Browse the repository at this point in the history
- Added HHVM back
- Only do coverage once
- PHPUnit is not a required dev dependency
- Tweaked travis setup
  • Loading branch information
boekkooi committed Jun 14, 2015
1 parent 3d28f62 commit d667d04
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 20 deletions.
27 changes: 12 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
language: php

php: [5.3.3, 5.3, 5.4, 5.5, 5.6]
php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm]

matrix:
fast_finish: true
include:
- { php: 5.3.3, env: "SYMFONY_VERSION=2.3.*" }
- { php: 5.5, env: "SYMFONY_VERSION=2.5.*" }
- { php: 5.6, env: "SYMFONY_VERSION=2.6.*" }
- { php: 5.6, env: "SYMFONY_VERSION=2.7.*" }
- { php: 5.3.3, env: "COMPOSER_LOWEST_VERSION=Y" }
- { php: 5.5, env: "COMPOSER_LOWEST_VERSION=Y SYMFONY_VERSION=2.5.*" }
- { php: 5.6, env: "COMPOSER_LOWEST_VERSION=Y SYMFONY_VERSION=2.6.*" }
- { php: 5.3.3, env: "COMPOSER_FLAGS='--prefer-stable --prefer-lowest' PHPUNIT_COVERAGE='--coverage-text --coverage-clover=coverage.clover'"}
allow_failures:
- { php: hhvm }

install:
before_script:
# Install npm deps
- travis_retry npm install grunt-cli -g
- travis_retry npm install
# Update composer and deps
- travis_retry composer self-update

before_script:
- sh -c 'if [ "$SYMFONY_VERSION" != "" ]; then travis_retry composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;'
- sh -c 'if [ "$COMPOSER_LOWEST_VERSION" != "" ]; then travis_retry composer update --prefer-lowest --prefer-stable --dev; else composer update --dev; fi;'
- mkdir -p build/logs
- travis_retry wget https://phar.phpunit.de/phpunit.phar
- sh -c 'if [ "${SYMFONY_VERSION}" != "" ]; then composer require --no-update symfony/symfony=${SYMFONY_VERSION}; fi;'
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source

script:
- php phpunit.phar --coverage-text --coverage-clover=coverage.clover
- vendor/bin/phpunit ${PHPUNIT_COVERAGE}
- grunt test

after_script:
- travis_retry wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- if [[ "${PHPUNIT_COVERAGE}" != "" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "${PHPUNIT_COVERAGE}" != "" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

cache:
directories:
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"symfony/browser-kit": "~2.3",
"symfony/dom-crawler": "~2.3",
"symfony/finder": "~2.3",
"symfony/yaml": "~2.3"
"symfony/yaml": "~2.3",

"phpunit/phpunit": "~4.7@stable",
"symfony/phpunit-bridge": "~2.7@stable"
},
"license": "MIT",
"authors": [
Expand Down
5 changes: 1 addition & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@

<phpunit colors="true" bootstrap="tests/bootstrap.php">
<php>
<ini name="error_reporting" value="-1"/>
<server name="KERNEL_DIR" value="tests/Functional/app" />

<!-- Disable E_USER_DEPRECATED -->
<!-- php -r 'echo -1 & ~E_USER_DEPRECATED;' -->
<ini name="error_reporting" value="-16385"/>
</php>

<testsuites>
Expand Down

0 comments on commit d667d04

Please sign in to comment.