forked from fusioninventory/fusioninventory-for-glpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (46 loc) · 1.69 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
sudo: false
language: php
php:
- 5.6
- 7.0
- 7.1
- nightly
matrix:
allow_failures:
- php: nightly
env:
# - GLPI=0.90/bugfixes
# - GLPI=0.85/bugfixes
# - GLPI=9.1/bugfixes
- GLPI=master
cache:
directories:
- $HOME/.composer/cache
addons:
apt:
packages:
- ant
- xsltproc
before_install:
- cd ..
- git clone --depth=10 -b $GLPI git://github.com/glpi-project/glpi.git glpi
- cd glpi
- composer install --no-dev -o
- cd ..
- mysql -u root -e "SET PASSWORD FOR 'travis'@'localhost' = PASSWORD('travis')"
- mysql -u root -e "GRANT ALL PRIVILEGES ON glpi.* TO 'travis'@'localhost';"
- mysql -u root -e "FLUSH PRIVILEGES;"
- echo '<?php class DB extends DBmysql {var $dbhost = "localhost";var $dbuser = "travis";var $dbpassword= "travis";var $dbdefault = "glpi";}' > glpi/config/config_db.php
- mv -f fusioninventory-for-glpi glpi/plugins/fusioninventory
- ant -Dclearsavepoint='true' -Dbasedir=. -f ./glpi/plugins/fusioninventory/phpunit/build.xml composer
before_script:
- phpenv version-name | grep ^5.[34] && echo "extension=apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; true
- phpenv version-name | grep ^5.[34] && echo "apc.enable_cli=1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; true
- php -S localhost:8088 -t glpi > /dev/null 2>&1 &
script:
- ant -Dclearsavepoint='true' -Dbasedir=. -f ./glpi/plugins/fusioninventory/phpunit/build.xml phpunit.all
after_script:
- cp -fr build glpi/plugins/fusioninventory/
- cd glpi/plugins/fusioninventory/
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then composer require satooshi/php-coveralls; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then php vendor/bin/coveralls -v; fi