forked from kaliop-uk/ezmigrationbundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
118 lines (94 loc) · 7.12 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# A Travis configuration file for a bundle which aims to be compatible with both eZPublish 5 and eZPlatform
language: php
# use the docker-based Travis images for a tiny speed boost
sudo: false
# 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
# but don't foget that php 5.3 is still supported by RedHat: https://access.redhat.com/support/policy/updates/errata.
# We limit the matrix to one version of eZPublish for each version of PHP
matrix:
include:
# ezpublish-community 2014.3 corresponds to enterprise 5.3, not supported any more since end of May 2017.
#- php: 5.4
# env: EZ_PACKAGES='ezsystems/ezpublish-community:~2014.3.2' EZ_VERSION=ezpublish-community EZ_APP_DIR=ezpublish EZ_KERNEL=EzPublishKernel CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=0
#- php: 5.5
# env: EZ_PACKAGES='ezsystems/ezpublish-community:~2014.3.2 netgen/tagsbundle:1.O' EZ_VERSION=ezpublish-community EZ_APP_DIR=ezpublish EZ_KERNEL=EzPublishKernel CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=0
# The last version of eZPublish Community Project, aka eZPublish 5, corresponds to eZPublish Platform (Enterprise) 5.4
# About php versions:
# - php 5.6 can be installed on RHEL/CentOS 6, which is the oldest currently supported
# - Debian 8 comes with php 5.6 too (Debian 7 has php 5.4 but it is only in LTS support by now)
# We thus only test on php 5.6
#- php: 5.4
# env: EZ_PACKAGES='ezsystems/ezpublish-community:~2014.11.0 ezsystems/behatbundle:~5.4 netgen/tagsbundle:~2.0' EZ_VERSION=ezpublish-community EZ_APP_DIR=ezpublish EZ_KERNEL=EzPublishKernel CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
#- php: 5.5
# env: EZ_PACKAGES='ezsystems/ezpublish-community:~2014.11.0 ezsystems/behatbundle:~5.4 netgen/tagsbundle:~2.0' EZ_VERSION=ezpublish-community EZ_APP_DIR=ezpublish EZ_KERNEL=EzPublishKernel CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
- php: 5.6
env: EZ_PACKAGES='ezsystems/ezpublish-community:~2014.11.0 ezsystems/behatbundle:~5.4 netgen/tagsbundle:~2.0' EZ_VERSION=ezpublish-community EZ_APP_DIR=ezpublish EZ_KERNEL=EzPublishKernel CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
# latest version currently available of eZPlatform aka eZPublish 6
#- php: 5.6
# env: EZ_PACKAGES='ezsystems/ezplatform:~1.8.0 ezsystems/ezplatform-xmltext-fieldtype:^1.1 ezsystems/behatbundle:^6.3 netgen/tagsbundle:~2.0' EZ_VERSION=ezplatform EZ_APP_DIR=app EZ_KERNEL=AppKernel CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
- php: 7.0
env: EZ_PACKAGES='ezsystems/ezplatform:~1.7.4 ezsystems/ezplatform-xmltext-fieldtype:^1.1 ezsystems/behatbundle:^6.3 netgen/tagsbundle:~2.0' EZ_VERSION=ezplatform EZ_APP_DIR=app EZ_KERNEL=AppKernel CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
- php: 7.1
env: EZ_PACKAGES='ezsystems/ezplatform:~1.7.4 ezsystems/ezplatform-xmltext-fieldtype:^1.2 ezsystems/behatbundle:^6.4 netgen/tagsbundle:~2.2' EZ_VERSION=ezplatform EZ_APP_DIR=app EZ_KERNEL=AppKernel CODE_COVERAGE=1 INSTALL_TAGSBUNDLE=1
- php: 7.2
env: EZ_PACKAGES='ezsystems/ezplatform:~1.11.0 ezsystems/ezplatform-xmltext-fieldtype:^1.3 ezsystems/behatbundle:^6.5 netgen/tagsbundle:~3.0' EZ_VERSION=ezplatform EZ_APP_DIR=app EZ_KERNEL=AppKernel CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
#allow_failures:
# this currently fails because of the refactoring of location matcher
#- php: 5.4
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
install:
# Latest version of composer breaks downloading eZ, so we can not run self-update. See https://github.com/composer/composer/issues/4582
#- composer self-update
# Increase php memory limit (need to do this now or we risk composer failing)
- phpenv config-add Tests/travis/zzz_php.ini
# Q: are all of these scripts ok here, or shall they be moved to the before_script step, when we add matrix combinations ???
# Disable xdebug for speed (executing composer), but allow us to e-enable it later
# NB: 'php -i' does not work on hhvm
- if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then export XDEBUG_INI=''; fi
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then export XDEBUG_INI=`php -i | grep xdebug.ini | grep home/travis | grep -v '=>' | head -1`; fi
- export XDEBUG_INI=${XDEBUG_INI/,/}
- if [ "$XDEBUG_INI" != "" ]; then mv "$XDEBUG_INI" "$XDEBUG_INI.bak"; fi
# We do not rely on the requirements set in composer.json, but install a different eZ version depending on the test matrix
# For the moment, to install eZPlatform, a set of DEV packages have to be allowed; really ugly sed expression to alter composer.json follows
# TODO is this still needed?
- 'if [ "$EZ_VERSION" = "ezplatform" ]; then sed -i ''s/"license": "GPL-2.0",/"license": "GPL-2.0", "minimum-stability": "dev", "prefer-stable": true,/'' composer.json; fi'
- composer require --prefer-source --dev ${EZ_PACKAGES}
# Q: is this needed at all ???
#- composer update
# Re-enable xdebug for when we need to generate code coverage
- if [ "$CODE_COVERAGE" = "1" -a "$XDEBUG_INI" != "" ]; then mv "$XDEBUG_INI.bak" "$XDEBUG_INI"; fi
# Create the database from sql files present in either the legacy stack or kernel
- ./Tests/travis/create-db.sh ${EZ_VERSION} behattestdb ${INSTALL_TAGSBUNDLE} root
before_script:
# Set up configuration files
- ./Tests/travis/setup-config.sh ${EZ_VERSION} ${EZ_APP_DIR} ${EZ_KERNEL} ${INSTALL_TAGSBUNDLE}
- . ./Tests/travis/setup-env.sh ${EZ_VERSION}
# TODO are these needed at all?
#- php vendor/ezsystems/ezpublish-community/ezpublish/console --env=behat assetic:dump
#- php vendor/ezsystems/ezpublish-community/ezpublish/console --env=behat cache:clear --no-debug
# TODO for eZPlatform, do we need to set up SOLR as well ?
#- if [ "$EZ_VERSION" = "ezplatform" ]; then ./vendor/ezsystems/ezplatform-solr-search-engine:bin/.travis/init_solr.sh; fi
script:
# Finally! :-D
# 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
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php -i; fi
#- 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
# reduce depth (history) of git checkout
git:
depth: 5
cache:
directories:
- $COMPOSER_CACHE_DIR