forked from ezsystems/repository-forms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
53 lines (46 loc) · 1.65 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
language: php
sudo: required
matrix:
# mark as finished before allow_failures are run
fast_finish: true
include:
# 5.6
- php: 5.6
env: TEST_CONFIG="phpunit.xml.dist"
- php: 5.6
env: BEHAT_OPTS="--profile=repository-forms"
# 7.0
- php: 7.0
env: TEST_CONFIG="phpunit.xml.dist"
- php: 7.0
env: BEHAT_OPTS="--profile=repository-forms"
# test only master (+ Pull requests)
branches:
only:
- master
- "1.4"
- "1.3"
- "1.2"
- "1.1"
- "/^feature-/"
before_install:
- echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# setup requirements for running unit/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
# 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 bin/phpunit -c $TEST_CONFIG ; fi
- if [ "$BEHAT_OPTS" != "" ] ; then cd "$HOME/build/ezplatform" && php bin/behat $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