Files
ezmigrationbundle/.travis.yml
2019-08-02 10:29:48 +00:00

64 lines
2.8 KiB
YAML

# A Travis configuration file for a bundle which aims to be compatible with both eZPublish 5 and eZPlatform
language: php
services:
- mysql
env:
global:
- SYMFONY_ENV=behat
- MYSQL_USER=ezp
- MYSQL_PASSWORD=ezp
- MYSQL_DATABASE=behattestdb
- MYSQL_HOST=localhost
# NB: see https://support.ez.no/Public/Service-Life for EOL dates of eZPublish versions
# and http://php.net/supported-versions.php for EOL dates of PHP versions
# About php versions:
# We limit the matrix to one version of eZPublish for each version of PHP
# @todo where we have 2 minor versions of the same 'main version' tested, we should test the lower numbered one forcing composer to use the oldest possible dependencies
matrix:
include:
# latest version currently available of eZPlatform 3 - currently 3.0.0-beta1
- php: 7.3
env: EZ_PACKAGES='ezsystems/ezplatform:dev-master ezsystems/ezplatform-xmltext-fieldtype:^2.0 ezsystems/behatbundle:^7.0 overblog/graphiql-bundle symfony/web-profiler-bundle symfony/debug-bundle' EZ_VERSION=ezplatform3 KERNEL_CLASS=App\\Kernel KERNEL_DIR=vendor/ezsystems/ezplatform/src CODE_COVERAGE=1 INSTALL_TAGSBUNDLE=0
#before_install:
# No need for a web server, until we start testing using Selenium
#- sudo apt-get update -qq
#- sudo apt-get install -qq -y --force-yes apache2 libapache2-mod-fastcgi
# @todo install memcached, java (for Solr)
install:
# just in case...
- chmod 755 ./Tests/environment/*.sh
- travis_wait ./Tests/environment/setup.sh
script:
# Note: make sure we run the version of phpunit we installed, not the system one. See: https://github.com/sebastianbergmann/phpunit/issues/2014
- if [ "$CODE_COVERAGE" = "1" ]; then ./vendor/phpunit/phpunit/phpunit --stderr --colors --coverage-clover=coverage.clover Tests/phpunit; else ./vendor/phpunit/phpunit/phpunit --stderr --colors Tests/phpunit; fi
#after_failure:
# Display as much info as we can to help developers
#- php -i
#- cat composer.lock
after_script:
# Upload code-coverage to Scrutinizer
- if [ "$CODE_COVERAGE" = "1" -a -f coverage.clover ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$CODE_COVERAGE" = "1" -a -f coverage.clover ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
# Upload code-coverage to CodeClimate. NB: this works only when the CODECLIMATE_REPO_TOKEN env var has been set (we do it in the Travis config via the GUI)
#- if [ "$CODE_COVERAGE" = "1" -a -f coverage.clover ]; then ./vendor/bin/test-reporter --coverage-report=coverage.clover; fi
# Upload code-coverage to CodeCov
- if [ "$CODE_COVERAGE" = "1" -a -f coverage.clover ]; then bash <(curl -s https://codecov.io/bash); fi
# reduce depth (history) of git checkout
git:
depth: 1
# Try to avoid problems with shared composer caches...
#cache:
# directories:
# - $COMPOSER_CACHE_DIR