Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

PHPunit 6 update #29

Merged
merged 4 commits into from Jan 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -12,6 +12,5 @@ vendor/
zf-mkdoc-theme/

clover.xml
composer.lock
coveralls-upload.json
phpunit.xml
55 changes: 41 additions & 14 deletions .travis.yml
Expand Up @@ -15,6 +15,9 @@ cache:

env:
global:
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="satooshi/php-coveralls"
- LEGACY_DEPS="phpunit/phpunit"
- SITE_URL: https://zendframework.github.io/zend-permissions-rbac
- GH_USER_NAME: "Matthew Weier O'Phinney"
- GH_USER_EMAIL: matthew@weierophinney.net
Expand All @@ -23,39 +26,63 @@ env:

matrix:
include:
- php: 5.5
- php: 5.6
env:
- EXECUTE_CS_CHECK=true
- DEPS=lowest
- php: 5.6
env:
- EXECUTE_TEST_COVERALLS=true
- DEPS=locked
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
- PATH="$HOME/.local/bin:$PATH"
- php: 5.6
env:
- DEPS=latest
- TEST_COVERAGE=true
- php: 7
- php: hhvm
allow_failures:
- php: hhvm
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- CHECK_CS=true
- php: 7
env:
- DEPS=latest
- php: 7.1
env:
- DEPS=lowest
- php: 7.1
env:
- DEPS=locked
- php: 7.1
env:
- DEPS=latest

notifications:
irc: "irc.freenode.org#zftalk.dev"
email: false

before_install:
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- composer self-update
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- travis_retry composer self-update

install:
- travis_retry composer install --no-interaction --ignore-platform-reqs
- travis_retry composer install $COMPOSER_ARGS
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- stty cols 120
- COLUMNS=120 composer show

script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $TEST_COVERAGE != 'true' ]]; then ./vendor/bin/phpunit ; fi
- if [[ $CHECK_CS == 'true' ]]; then ./vendor/bin/php-cs-fixer fix -v --diff --dry-run ; fi
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/zendframework/zf-mkdoc-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi

after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then echo "Preparing to build and deploy documentation" ; ./zf-mkdoc-theme/deploy.sh ; echo "Completed deploying documentation" ; fi

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then ./vendor/bin/coveralls ; fi
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -13,7 +13,7 @@
}
},
"require": {
"php": ">=5.5"
"php": "^7.0 || ^5.6"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand All @@ -30,6 +30,6 @@
},
"require-dev": {
"fabpot/php-cs-fixer": "1.7.*",
"phpunit/PHPUnit": "~4.0"
"phpunit/PHPUnit": "^6.2.1 || ^5.7.15"
}
}