-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
47 lines (40 loc) · 1.34 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
language: php
sudo: required
matrix:
# mark as finished before allow_failures are run
fast_finish: true
include:
- php: hhvm
env: TEST_CONFIG="phpunit.xml.dist"
# 5.5
- php: 5.5
env: TEST_CONFIG="phpunit.xml.dist" SYMFONY_VERSION="~2.7.0"
# 5.6
- php: 5.6
env: TEST_CONFIG="phpunit.xml.dist" SYMFONY_VERSION="~2.7.0"
# 7.0
- php: 7.0
env: TEST_CONFIG="phpunit.xml.dist"
# test only master (+ Pull requests)
branches:
only:
- master
# setup requirements for running unit/behat 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`"]}
# symlink config.php file
- if [ ! -f vendor/ezsystems/ezpublish-kernel/config.php ]; then ln -s config.php-DEVELOPMENT vendor/ezsystems/ezpublish-kernel/config.php ; fi
# execute phpunit or behat as the script command
script:
- vendor/bin/phpcs src --standard=PSR2 -n
- if [ "$TEST_CONFIG" != "" ] ; then php -d date.timezone=$TEST_TIMEZONE -d memory_limit=-1 vendor/bin/phpunit -c $TEST_CONFIG ; fi
# disable mail notifications
notifications:
email: true
# reduce depth (history) of git checkout
git:
depth: 30