forked from ezsystems/ezpublish-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (74 loc) · 4.03 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
language: php
# execute unit tests, integration test stubs and integration tests using legacy storage engine
env:
global:
- DB_NAME="testdb"
matrix:
# mark as finished before allow_failures are run
fast_finish: true
# misc nighlty tests we keep an eye on and aim to fix closer to stable versions
# allow_failures:
# - php: hhvm
# env: TEST_CONFIG="phpunit.xml"
include:
# 5.4
- php: 5.4
env: TEST_CONFIG="phpunit.xml"
- php: 5.4
env: TEST_CONFIG="phpunit-integration-legacy.xml" DB="postgresql" DATABASE="pgsql://postgres@localhost/$DB_NAME"
# 5.5
- php: 5.5
env: TEST_CONFIG="phpunit.xml"
- php: 5.5
env: TEST_CONFIG="phpunit-integration-legacy.xml" DB="mysql" DATABASE="mysql://root@localhost/$DB_NAME"
# 5.6
- php: 5.6
env: TEST_CONFIG="phpunit.xml"
- php: 5.6
env: TEST_CONFIG="phpunit-integration-legacy.xml"
- php: 5.6
env: BEHAT_OPTS="--profile=demo --suite=clean"
- php: 5.6
env: BEHAT_OPTS="--profile=core"
# 7.0
- php: 7.0
env: REST_TEST_CONFIG="phpunit-functional-rest.xml"
- php: 7.0
env: TEST_CONFIG="phpunit.xml"
- php: 7.0
env: BEHAT_OPTS="--profile=rest --suite=fullJson"
- php: 7.0
env: ELASTICSEARCH_VERSION="1.4.2" TEST_CONFIG="phpunit-integration-legacy-elasticsearch.xml"
# - php: 7.0
# env: SOLR_VERSION="4.10.4" TEST_CONFIG="phpunit-integration-legacy-solr.xml" CORES_SETUP="dedicated" SOLR_CORES="core0 core1 core2 core3" SOLR_CONFS="vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/schema.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/custom-fields-types.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/language-fieldtypes.xml"
# - php: 7.0
# env: SOLR_VERSION="4.10.4" TEST_CONFIG="phpunit-integration-legacy-solr.xml" CORES_SETUP="shared" SOLR_CORES="core0 core1 core2 core3" SOLR_CONFS="vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/schema.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/custom-fields-types.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/language-fieldtypes.xml"
- php: 7.0
env: SOLR_VERSION="4.10.4" TEST_CONFIG="phpunit-integration-legacy-solr.xml" CORES_SETUP="single" SOLR_CONFS="vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/schema.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/custom-fields-types.xml vendor/ezsystems/ezplatform-solr-search-engine/lib/Resources/config/solr/language-fieldtypes.xml"
# hhvm - disabled, no need to enable before travis has newer versions avaiable
# - php: hhvm
# env: TEST_CONFIG="phpunit.xml"
# test only master (+ Pull requests)
branches:
only:
- master
# setup requirements for running unit/integration/behat tests
before_script:
# Prepare system
- if [ "$TEST_CONFIG" != "" ] ; then ./bin/.travis/prepare_unittest.sh ; fi
- if [ "$BEHAT_OPTS" != "" ] ; then ./bin/.travis/prepare_behat.sh ; fi
- if [ "$REST_TEST_CONFIG" != "" ] ; then ./bin/.travis/prepare_behat.sh ; echo pwd; cd "$HOME/build/ezplatform/vendor/ezsystems/ezpublish-kernel"; ./bin/.travis/prepare_rest_functional_tests.sh; fi
# Detecting timezone issues by testing on random timezone
- TEST_TIMEZONES=("America/New_York" "Asia/Calcutta" "UTC")
- TEST_TIMEZONE=${TEST_TIMEZONES["`shuf -i 0-2 -n 1`"]}
# execute phpunit or behat as the script command
script:
- if [ "$TEST_CONFIG" != "" ] ; then php -d date.timezone=$TEST_TIMEZONE -d memory_limit=-1 vendor/bin/phpunit -c $TEST_CONFIG ; fi
- if [ "$BEHAT_OPTS" != "" ] ; then cd "$HOME/build/ezplatform" && php bin/behat -vv $BEHAT_OPTS ; fi
- if [ "$REST_TEST_CONFIG" != "" ] ; then cd "$HOME/build/ezplatform"; php -d date.timezone=$TEST_TIMEZONE -d memory_limit=-1 bin/phpunit -v vendor/ezsystems/ezpublish-kernel/eZ/Bundle/EzPublishRestBundle/Tests/Functional ; fi
# disable mail notifications
notifications:
email: false
# reduce depth (history) of git checkout
git:
depth: 30