forked from ezsystems/ezrecommendation-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (37 loc) · 1.29 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
language: php
dist: trusty
sudo: false
cache:
directories:
- $HOME/.composer/cache/files
matrix:
fast_finish: true
include:
- php: 7.3
# test only master (+ Pull requests)
branches:
only:
- master
- /^\d.\d+$/
before_script:
# Disable xdebug to speed things up as we don't currently generate coverge on travis
- if [ $TRAVIS_PHP_VERSION != "hhvm" ]; then phpenv config-rm xdebug.ini ; fi
- echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
# If set update symfony version
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony=$SYMFONY_VERSION; fi;
# Remove php-cs-fixer as it is currently not needed on Travis
- composer remove --dev --no-update friendsofphp/php-cs-fixer
# Install packages using composer
- composer install --prefer-dist
# 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: "php -d date.timezone=$TEST_TIMEZONE -d memory_limit=-1 vendor/bin/phpunit"
# disable mail notifications
notifications:
email: false
# reduce depth (history) of git checkout
git:
depth: 30