-
-
Notifications
You must be signed in to change notification settings - Fork 158
/
Copy path.travis.yml
61 lines (52 loc) · 1.86 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
language: php
notifications:
email:
php:
- 5.6
- 7
- hhvm
matrix:
allow_failures:
- php: hhvm
before_install:
- mkdir $TRAVIS_BUILD_DIR/plugin
- mv !(plugin) plugin
- git clone https://github.com/pimcore/pimcore.git $TRAVIS_BUILD_DIR/pimcore
- cd $TRAVIS_BUILD_DIR/pimcore
# - git checkout 4.0.0-RC1
- cd $TRAVIS_BUILD_DIR
- mkdir $TRAVIS_BUILD_DIR/pimcore/plugins
- mv $TRAVIS_BUILD_DIR/plugin $TRAVIS_BUILD_DIR/pimcore/plugins/CoreShop
install:
- composer self-update
- cd $TRAVIS_BUILD_DIR/pimcore
- composer install
- composer require "phpunit/phpunit:5.7.*" --dev --update-with-dependencies
- cd $TRAVIS_BUILD_DIR/pimcore/plugins/CoreShop
- composer install
before_script:
# install apache
- cd $TRAVIS_BUILD_DIR
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi
- sudo a2enmod rewrite actions fastcgi alias
# customize php settings
- sudo chmod 0755 .travis/setup-fpm.sh .travis/setup-hhvm.sh
- if [[ "$TRAVIS_PHP_VERSION" != *"hhvm"* ]]; then .travis/setup-fpm.sh; fi
- if [[ "$TRAVIS_PHP_VERSION" == *"hhvm"* ]]; then .travis/setup-hhvm.sh; fi
# configure apache virtual hosts - config was copied in the individual setup scripts above (FPM/HHVM)
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- sudo service apache2 restart
# make tests executable
- cd $TRAVIS_BUILD_DIR/pimcore/plugins/CoreShop/tests
- sudo chmod 0755 alltests.sh hhvm-all.sh
script:
- if [[ "$TRAVIS_PHP_VERSION" != *"hhvm"* ]]; then ./alltests.sh; fi
- if [[ "$TRAVIS_PHP_VERSION" == *"hhvm"* ]]; then ./hhvm-all.sh; fi
after_script:
- cat $TRAVIS_BUILD_DIR/tests/tmp/var/log/debug.log
- cat $TRAVIS_BUILD_DIR/tests/tmp/var/log/php.log
- cat $TRAVIS_BUILD_DIR/apache-error.log
- cat $TRAVIS_BUILD_DIR/apache-access.log
- cat /tmp/hhvm.log