forked from php-enqueue/enqueue-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (63 loc) · 2.66 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
git:
depth: 10
language: php
matrix:
include:
- php: 7.1
sudo: false
env: SYMFONY_VERSION=3.4.* PHPSTAN=true
- php: 7.1
sudo: false
env: SYMFONY_VERSION=3.4.* PHP_CS_FIXER=true
- php: 7.1
sudo: false
env: SYMFONY_VERSION=3.4.* UNIT_TESTS=true
- php: 7.1
sudo: false
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
- php: 7.2
sudo: false
env: SYMFONY_VERSION=4.0.* UNIT_TESTS=true
- php: 7.1
services: docker
sudo: required
env: SYMFONY_VERSION=3.4.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
sudo: required
services: docker
env: SYMFONY_VERSION=4.0.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
- php: 7.1
sudo: required
services: docker
env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
allow_failures:
- env: SYMFONY_VERSION=3.4.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
cache:
directories:
- $HOME/.composer/cache
- $HOME/php-cs-fixer
before_install:
- echo "extension = mongodb.so" >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = redis.so" >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
install:
- rm $HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini;
- echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- php ./bin/fix-symfony-version.php "$SYMFONY_VERSION"
- composer install
- if [ "$PREPARE_CONTAINER" = true ]; then docker --version; fi
- if [ "$PREPARE_CONTAINER" = true ]; then docker-compose --version; fi
- if [ "$PREPARE_CONTAINER" = true ]; then bin/dev -b; fi
script:
- PKG_PHP_CHANGED_FILES=`./bin/git-find-changed-php-files.sh "${TRAVIS_COMMIT_RANGE}"`
- if [ "$PHP_CS_FIXER" = true ] && [ ! -z "${PKG_PHP_CHANGED_FILES}" ]; then ./bin/php-cs-fixer fix --config=.php_cs.php --no-interaction --dry-run --diff -v --path-mode=intersection -- ${PKG_PHP_CHANGED_FILES[@]} ; fi
- if [ "$PHPSTAN" = true ] && [ ! -z "${PKG_PHP_CHANGED_FILES}" ]; then docker run --workdir="/mqdev" -v "`pwd`:/mqdev" --rm enqueue/dev:latest php -d memory_limit=1024M bin/phpstan analyse -l 1 -c phpstan.neon -- ${PKG_PHP_CHANGED_FILES[@]} ; fi
- if [ "$UNIT_TESTS" = true ]; then bin/phpunit --exclude-group=functional; fi
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/test.sh --exclude-group=rdkafka; fi
- if [ "RDKAFKA_TESTS" = true ]; then bin/test.sh --group=rdkafka; fi
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/3f8b3668e7792de23a49
on_success: change
on_failure: always
on_start: never