forked from kaliop-uk/ezmigrationbundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (68 loc) · 4.71 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
# 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:
# - php 5.6 can be installed on RHEL/CentOS 6, which is the oldest currently supported (see at the bottom of https://access.redhat.com/support/policy/updates/errata)
# - Debian 8 comes with php 5.6 too - although it is in LTS support by now
# We thus still test on php 5.6
# 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:
# The last version of eZPublish Community Project, aka eZPublish 5, corresponds to eZPublish Platform (Enterprise) 5.4
- php: 5.6
env: EZ_PACKAGES='ezsystems/ezpublish-community:~2014.11.1 ezsystems/behatbundle:^5.4 netgen/tagsbundle:^2.0' EZ_VERSION=ezpublish-community EZ_APP_DIR=ezpublish EZ_KERNEL=EzPublishKernel KERNEL_DIR=vendor/ezsystems/ezpublish-community/ezpublish CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
# eZPlatform 1 aka eZPublish 6 - earliest LTS release is 1.7
- php: 7.0
env: EZ_PACKAGES='ezsystems/ezplatform:~1.7.9 ezsystems/ezplatform-xmltext-fieldtype:^1.1 ezsystems/behatbundle:^6.3 netgen/tagsbundle:^2.0' EZ_VERSION=ezplatform EZ_APP_DIR=app EZ_KERNEL=AppKernel KERNEL_DIR=vendor/ezsystems/ezplatform/app CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
# last version available of eZPlatform 1 - also an LTS
- php: 7.1
env: EZ_PACKAGES='ezsystems/ezplatform:~1.13.5 ezsystems/ezplatform-xmltext-fieldtype:^1.1 ezsystems/behatbundle:^6.3 netgen/tagsbundle:^2.0' EZ_VERSION=ezplatform EZ_APP_DIR=app EZ_KERNEL=AppKernel KERNEL_DIR=vendor/ezsystems/ezplatform/app CODE_COVERAGE=1 INSTALL_TAGSBUNDLE=1
# next-to-latest version currently available of eZPlatform 2
# sensio/generator-bundle is only needed because we run the tests using 'behat' sf env
- php: 7.2
env: EZ_PACKAGES='ezsystems/ezplatform:~2.4.2 ezsystems/ezplatform-xmltext-fieldtype:^1.8 ezsystems/behatbundle:^6.5 netgen/tagsbundle:^3.0 sensio/generator-bundle' EZ_VERSION=ezplatform2 EZ_APP_DIR=app EZ_KERNEL=AppKernel KERNEL_DIR=vendor/ezsystems/ezplatform/app CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
# latest version currently available of eZPlatform 2 - currently 2.5, which is also LTS
- php: 7.3
env: EZ_PACKAGES='ezsystems/ezplatform:^2.5.1 ezsystems/ezplatform-xmltext-fieldtype:^1.8 ezsystems/behatbundle:^6.5 netgen/tagsbundle:^3.0 sensio/generator-bundle overblog/graphiql-bundle' EZ_VERSION=ezplatform2 EZ_APP_DIR=app EZ_KERNEL=AppKernel KERNEL_DIR=vendor/ezsystems/ezplatform/app CODE_COVERAGE=0 INSTALL_TAGSBUNDLE=1
#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