forked from fusioninventory/fusioninventory-for-glpi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
68 lines (62 loc) · 1.99 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
language: php
env:
global:
- GLPI=master
- DB=mysql
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 5.6
addons:
apt:
packages:
- ant
- xsltproc
- php: 7.0
addons:
mariadb: 10.2
apt:
packages:
- ant
- xsltproc
- php: 7.1
env: CS=true
addons:
mariadb: 10.1
apt:
packages:
- ant
- xsltproc
- php: 7.2
addons:
apt:
packages:
- ant
- xsltproc
- php: nightly
allow_failures:
- php: nightly
- php: 7.2
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:
- composer install
- mysql -u root -e 'select version();'
- ant -Dclearsavepoint='true' -Dbasedir=. -f ./glpi/plugins/fusioninventory/phpunit/build.xml phpunit.all
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then cd glpi/plugins/fusioninventory && composer install && php vendor/bin/robo --no-interaction code:cs; fi