SImplefied travis config and added composer scripts (#213)

* SImplefied travis config and added composer scripts

* Use 2 space indentation
This commit is contained in:
Tobias Nyholm 2016-11-11 21:22:46 +01:00 committed by Sean Johnson
parent 0d2916d47f
commit c875890720
3 changed files with 15 additions and 14 deletions

View File

@ -1,19 +1,18 @@
language: php language: php
php: php:
- 5.5 - 5.5
- 5.6 - 5.6
- 7.0 - 7.0
- hhvm - hhvm
before_install:
- travis_retry composer self-update
install: install:
- travis_retry composer install - travis_retry composer install
- travis_retry composer require --dev 'phpunit/php-code-coverage=^2.2.4'
script: script:
- phpunit -c phpunit.xml.dist --testsuite unit --coverage-text - composer test
- phpunit -c phpunit.xml.dist --testsuite functional --coverage-text - '[[ "${TRAVIS_PULL_REQUEST}" == "false" ]] && ( composer test-coverage ) || ( echo "Testing PR - No integration tests available")'
- '[[ "${TRAVIS_PULL_REQUEST}" == "false" ]] && ( phpunit -c phpunit.xml.dist --testsuite
integration --coverage-text ) || ( echo "Testing PR - No integration tests available")'
notifications: notifications:
slack: slack:
rooms: rooms:

View File

@ -31,5 +31,8 @@
"email": "travis@mailgunhq.com" "email": "travis@mailgunhq.com"
} }
], ],
"minimum-stability": "stable" "scripts": {
"test": "vendor/bin/phpunit --testsuite unit && vendor/bin/phpunit --testsuite functional",
"test-coverage": "vendor/bin/phpunit --testsuite integration --coverage-text --coverage-clover=build/coverage.xml"
}
} }

View File

@ -34,5 +34,4 @@
<directory suffix=".php">src</directory> <directory suffix=".php">src</directory>
</whitelist> </whitelist>
</filter> </filter>
</phpunit> </phpunit>