forked from ezsystems/ezpublish-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shippable.yml
81 lines (73 loc) · 3.11 KB
/
shippable.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
language: php
# run tests on php misc php versions
php:
- 5.4
- 5.5
- 5.6
# execute unit tests, integration test stubs and integration tests using legacy storage engine
env:
global:
- DB_NAME="testdb"
matrix:
# If SYMFONY_VERSION is not specified, will take the latest available.
- TEST_CONFIG="phpunit.xml"
- TEST_CONFIG="phpunit.xml" SYMFONY_VERSION="~2.6@beta"
- TEST_CONFIG="phpunit-integration-legacy.xml" SYMFONY_VERSION="~2.6@beta"
- TEST_CONFIG="phpunit-integration-legacy.xml" DB="postgresql" DATABASE="pgsql://postgres@localhost/$DB_NAME"
- TEST_CONFIG="phpunit-integration-legacy.xml" DB="mysql" DATABASE="mysql://root@localhost/$DB_NAME"
- SOLR_VERSION="4.10.1" TEST_CONFIG="phpunit-integration-legacy-solr.xml"
- ELASTICSEARCH_VERSION="1.4.2" TEST_CONFIG="phpunit-integration-legacy-elasticsearch.xml"
matrix:
exclude:
# 5.4 run: unit test + postgres integration test
- php: 5.4
env: TEST_CONFIG="phpunit.xml" SYMFONY_VERSION="~2.6@beta"
- php: 5.4
env: TEST_CONFIG="phpunit-integration-legacy.xml" SYMFONY_VERSION="~2.6@beta"
- php: 5.4
env: TEST_CONFIG="phpunit-integration-legacy.xml" DB="mysql" DATABASE="mysql://root@localhost/$DB_NAME"
- php: 5.4
env: SOLR_VERSION="4.10.1" TEST_CONFIG="phpunit-integration-legacy-solr.xml"
- php: 5.4
env: ELASTICSEARCH_VERSION="1.4.2" TEST_CONFIG="phpunit-integration-legacy-elasticsearch.xml"
# 5.5 run: unit test (Symfony 2.3) + mysql integration test + solr 4.x integration test
- php: 5.5
env: TEST_CONFIG="phpunit.xml"
- php: 5.5
env: TEST_CONFIG="phpunit-integration-legacy.xml" SYMFONY_VERSION="~2.6@beta"
- php: 5.5
env: TEST_CONFIG="phpunit-integration-legacy.xml" DB="postgresql" DATABASE="pgsql://postgres@localhost/$DB_NAME"
# 5.6 run: unit test + sqlite integration test
- php: 5.6
env: TEST_CONFIG="phpunit.xml" SYMFONY_VERSION="~2.6@beta"
- php: 5.6
env: TEST_CONFIG="phpunit-integration-legacy.xml" DB="postgresql" DATABASE="pgsql://postgres@localhost/$DB_NAME"
- php: 5.6
env: TEST_CONFIG="phpunit-integration-legacy.xml" DB="mysql" DATABASE="mysql://root@localhost/$DB_NAME"
- php: 5.6
env: SOLR_VERSION="4.10.1" TEST_CONFIG="phpunit-integration-legacy-solr.xml"
- php: 5.6
env: ELASTICSEARCH_VERSION="1.4.2" TEST_CONFIG="phpunit-integration-legacy-elasticsearch.xml"
# test only master (+ Pull requests)
branches:
only:
- 5.4
- stable-5.3
- stable-5.1
# setup requirements for running unit tests
before_script:
# Prepare system
- if [ "$TEST_CONFIG" != "" ] ; then ./bin/.travis/prepare_unittest.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`"]}
- echo "$TEST_TIMEZONE"
# execute phpunit 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
# disable mail notifications
notification:
email: false
# reduce depth (history) of git checkout
git:
depth: 30