forked from fusioninventory/fusioninventory-for-glpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (68 loc) · 2.09 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
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: 7.3
- php: nightly
allow_failures:
- php: nightly
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;"
- mv -f fusioninventory-for-glpi glpi/plugins/fusioninventory
- pushd glpi
- php scripts/cliinstall.php --db=glpi --user=travis --pass=travis
- php scripts/cliupdate.php |grep -q "No migration needed." || (echo "scripts/cliupdate.php FAILED" && exit 1)
- popd
- ant -Dclearsavepoint='true' -Dbasedir=. -f ./glpi/plugins/fusioninventory/phpunit/build.xml composer
- pushd glpi/plugins/fusioninventory/phpunit/
- composer install
- popd
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