forked from sulu/sulu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
70 lines (63 loc) · 2.44 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
sudo: false
cache:
directories:
- $HOME/.composer/cache
- downloads
env:
global:
- APP_ENV="test"
- APP_SECRET=a448d1dfcaa563fce56c2fd9981f662b
- MAILER_URL=null://localhost
- SULU_ADMIN_EMAIL=
- JACKRABBIT_VERSION=2.12.0
- PHPCR_TRANSPORT=doctrinedbal
- TEST_FLAGS=""
- DATABASE_URL=mysql://root:@127.0.0.1/sulu_test
- DATABASE_CHARSET=utf8mb4
- DATABASE_COLLATE=utf8mb4_unicode_ci
- PHPSTAN=
matrix:
include:
- language: php
php: 7.2
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction"
- SYMFONY_DEPRECATIONS_HELPER="weak"
- PHPSTAN=true
- language: php
php: 7.1
env:
- COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction"
- DATABASE_URL=postgres://postgres:[email protected]/sulu_test
- PHPCR_TRANSPORT=jackrabbit
- DATABASE_CHARSET=UTF8
- DATABASE_COLLATE=
# restart jackrabbit after each suite see: https://github.com/sulu-io/sulu/issues/2137
- TEST_FLAGS="--jackrabbit-restart"
- SYMFONY_DEPRECATIONS_HELPER="weak"
before_script:
- if [ ! -d downloads ]; then mkdir downloads; fi
- |
if [[ $PHPCR_TRANSPORT = jackrabbit ]]; then
if [ ! -f downloads/jackrabbit-standalone-$JACKRABBIT_VERSION.jar ]; then
cd downloads
wget http://archive.apache.org/dist/jackrabbit/$JACKRABBIT_VERSION/jackrabbit-standalone-$JACKRABBIT_VERSION.jar
cd -
fi
java -jar downloads/jackrabbit-standalone-$JACKRABBIT_VERSION.jar > /dev/null &
fi
# the content tests are intensive and there are memory leaks, this is more pronounced with the Jackalope DBAL PHPCR implementation.
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- phpenv config-rm xdebug.ini
- php -i | grep memory_limit
- php -m
- composer self-update
- if [[ $PHPCR_TRANSPORT = jackrabbit ]]; then composer require jackalope/jackalope-jackrabbit:~1.2 --no-update --no-interaction ; fi
- composer validate --strict
- composer update $COMPOSER_FLAGS
script:
- if [[ $PHPSTAN = true ]]; then bin/adminconsole cache:clear --env=dev; ./vendor/bin/phpstan analyze .; fi
- time ./bin/runtests -i -a $TEST_FLAGS
notifications:
slack:
secure: "Gd3/1e0pBKvJv1UhWpBkWijJpmSWlarg6uPBJO0h4z1IpkZjd++jOjhmOQ7n+yMfuapQuJTcVOK0yIWu7orJoGAKFkBlMEIrLk1xMAG9phjjMLUO0FWgcQ3eVW5mTyfMBtClz4OL5wXckw17ohtXHDK8qnI0Hz9Qj8Rqgf2OZhM="