From c875890720d0cbacd9f6bb698c9ab74cc93e9fc7 Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 11 Nov 2016 21:22:46 +0100 Subject: [PATCH] SImplefied travis config and added composer scripts (#213) * SImplefied travis config and added composer scripts * Use 2 space indentation --- .travis.yml | 23 +++++++++++------------ composer.json | 5 ++++- phpunit.xml.dist | 1 - 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 353a20a..87d8e7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,18 @@ language: php + php: -- 5.5 -- 5.6 -- 7.0 -- hhvm -before_install: -- travis_retry composer self-update + - 5.5 + - 5.6 + - 7.0 + - hhvm + install: -- travis_retry composer install -- travis_retry composer require --dev 'phpunit/php-code-coverage=^2.2.4' + - travis_retry composer install + script: -- phpunit -c phpunit.xml.dist --testsuite unit --coverage-text -- phpunit -c phpunit.xml.dist --testsuite functional --coverage-text -- '[[ "${TRAVIS_PULL_REQUEST}" == "false" ]] && ( phpunit -c phpunit.xml.dist --testsuite - integration --coverage-text ) || ( echo "Testing PR - No integration tests available")' + - composer test + - '[[ "${TRAVIS_PULL_REQUEST}" == "false" ]] && ( composer test-coverage ) || ( echo "Testing PR - No integration tests available")' + notifications: slack: rooms: diff --git a/composer.json b/composer.json index c429c5d..449b4ad 100644 --- a/composer.json +++ b/composer.json @@ -31,5 +31,8 @@ "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" + } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index bbe28c2..fb6a76f 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -34,5 +34,4 @@ src -