forked from sulu/sulu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
95 lines (88 loc) · 3.51 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
sudo: false
dist: trusty
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
- DATABASE_URL=mysql://root:@127.0.0.1/sulu_test?serverVersion=5.6
- DATABASE_CHARSET=utf8mb4
- DATABASE_COLLATE=utf8mb4_unicode_ci
- PHPSTAN=
matrix:
include:
- language: php
php: 7.4
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction"
- SYMFONY_DEPRECATIONS_HELPER="weak"
- PHPSTAN=true
- PECL_INSTALL=imagick
- LINT_CONTAINER=true
services:
- mysql
- language: php
php: 7.2
env:
- COMPOSER_FLAGS="--prefer-lowest --prefer-dist --no-interaction"
- DATABASE_URL=postgres://postgres:[email protected]/sulu_test?serverVersion=9.2
- PHPCR_TRANSPORT=jackrabbit
- DATABASE_CHARSET=UTF8
- DATABASE_COLLATE=
- SYMFONY_DEPRECATIONS_HELPER="disabled"
- ENABLE_SWAP=true
services:
- postgresql
before_script:
- |
if [[ $PECL_INSTALL ]]; then
printf "\n" | pecl install $PECL_INSTALL
fi
- | # enable swap
if [[ $ENABLE_SWAP == 'true' ]]; then
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo sysctl vm.swappiness=10
fi
- 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
- 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 -o $COMPOSER_FLAGS
script:
- bin/adminconsole cache:clear --env=dev
- bin/websiteconsole cache:clear --env=dev
- if [[ $PHPSTAN = true ]]; then ./vendor/bin/phpstan analyze; fi
- if [[ $LINT_CONTAINER = true ]]; then bin/adminconsole lint:container --env dev; fi
- if [[ $LINT_CONTAINER = true ]]; then bin/websiteconsole lint:container --env dev; fi
- if [[ $LINT_CONTAINER = true ]]; then bin/adminconsole lint:container --env test; fi
- if [[ $LINT_CONTAINER = true ]]; then bin/websiteconsole lint:container --env test; fi
- if [[ $LINT_CONTAINER = true ]]; then bin/adminconsole lint:container --env stage; fi
- if [[ $LINT_CONTAINER = true ]]; then bin/websiteconsole lint:container --env stage; fi
- if [[ $LINT_CONTAINER = true ]]; then bin/adminconsole lint:container --env prod; fi
- if [[ $LINT_CONTAINER = true ]]; then bin/websiteconsole lint:container --env prod; fi
- time ./bin/runtests -i -a
notifications:
slack:
secure: "Gd3/1e0pBKvJv1UhWpBkWijJpmSWlarg6uPBJO0h4z1IpkZjd++jOjhmOQ7n+yMfuapQuJTcVOK0yIWu7orJoGAKFkBlMEIrLk1xMAG9phjjMLUO0FWgcQ3eVW5mTyfMBtClz4OL5wXckw17ohtXHDK8qnI0Hz9Qj8Rqgf2OZhM="