This repository has been archived by the owner on Aug 9, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 79
/
.travis.yml
104 lines (87 loc) · 3.59 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
96
97
98
99
100
101
102
103
# dist: trusty
language: php
sudo: required
services:
- mysql
env:
global:
- GLPI_SOURCE="https://github.com/glpi-project/glpi"
- FI_SOURCE="https://github.com/fusioninventory/fusioninventory-for-glpi"
- CS=7.2
- APIDOCS_PHP=7.1
- DB_HOST=127.0.0.1
- MYSQL_ROOT_USER=root
- DB_USER=glpi
- DB_PASSWD=glpi
- DB_NAME=glpitest
- OLD_DB_NAME=glpiupgradetest
- PLUGINNAME=flyvemdm
- PATCH_ARGS="-p1 -N --batch"
- AFTER_SUCCESS_BRANCH=9.3/bugfixes
- secure: Y9sG3lZ3Fn3t5BXvcMJQxWsdSUVQgF4M08E6oouYrRc95HEj3ZwZOqp6Df58u8CQFA0EKJyvCBLn8UicvHGMKAD0RwGLBdSP4Ji9gJRZkyMZi79awSshdva/c8dqVQrRd4asuTNQfcagVJpNDnY8sYusw504JUilK3vFVp+39nNZUkcvT69NGVIlXzgHTYinBkVuqDhf5eVtcLcaESLEshrg+5ZERdm+0KifdJVREzhicJxofnmTl/wBsIP7XiQqspljf2/SxLqreGmWXYXUfqIwIOVtsd9fkZChQCz8USC7P427tH6styRDYuMCtvA9b/T/XacSdKFbuDezff3NbIM3b5BebDyCrOK5MGSOdRUY5RuyZN4R5LjePUE++9QNCUPeDSkfb23v0VfuqXIRAxfdtik517GzFy6O7/e6FU1msVZlGQED7Uek9nqnupj+0lIq+99Jcm1UCNJu1NTL2Tv80XXqySaxyE4Sedq/FiYAsy1bo2cg2367I2b4FhFXaJCKkFHcdjHXAeurkRy/brSPhBNoOO5/GA3RepUErgly4P8TLZqHNZv8rgMUoQ88sdwDyXG7dY4UwWiTlCkxMBTqBqJanlTMA9zn2bYyMDioTGnA7+VYAA8cddjFOMVrmmuFJ+YV2x1+5B5qd+Wt8RPwcPQDyqaiN5amb1HGeMA=
matrix:
- GLPI_BRANCH=9.4/bugfixes FI_BRANCH=glpi9.4+1.1
- GLPI_BRANCH=9.5/bugfixes FI_BRANCH=glpi9.5
- GLPI_BRANCH=master FI_BRANCH=master
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- nightly
matrix:
exclude:
- GLPI_BRANCH=9.5/bugfixes
php: 5.6
- master
php: 5.6
allow_failures:
- php: nightly
- env: GLPI_BRANCH=master FI_BRANCH=master
before_install:
- |
if [ "$TRAVIS_SECURE_ENV_VARS" = "true" ]; then
mkdir ~/.composer -p
touch ~/.composer/composer.json
composer config -g github-oauth.github.com $GH_TOKEN
fi
- # set -x
- . ./tests/script-functions.sh
- . ./tests/script-specific-functions.sh
- init_databases
- install_glpi && install_plugin
script:
- COVERAGE="-ncc"
- if [ "${TRAVIS_PHP_VERSION:0:3}" = "$CS" ] && [ "$GLPI_BRANCH" = "$AFTER_SUCCESS_BRANCH" ]; then COVERAGE="--nccfc CommonTreeDropdown CommonDropdown CommonDBTM CommonGLPI CommonDBConnexity CommonDBRelation"; fi
- # install GLPI with an old schema of the plugin and upgrade it
- export GLPI_CONFIG_DIR="tests/config-$OLD_DB_NAME"
- init_glpi $OLD_DB_NAME $DB_USER $DB_PASSWD && init_plugin
- # upgrade test
- echo status of plugins
- mysql -h$DB_HOST -u$DB_USER -p$DB_PASSWD $OLD_DB_NAME -e "select name,directory,version,state from glpi_plugins WHERE directory IN ('flyvemdm', 'fusioninventory')"
- plugin_test_upgrade
- # install GLPI with a fresh install of the plugin
- export GLPI_CONFIG_DIR="tests/config-$DB_NAME"
- init_glpi $DB_NAME $DB_USER $DB_PASSWD && init_plugin
- # fresh install test
- plugin_test_install
- plugin_test
- plugin_test_uninstall
- if [ ${TRAVIS_PHP_VERSION:0:3} == "$CS" ] && [ "$GLPI_BRANCH" = "$AFTER_SUCCESS_BRANCH" ]; then plugin_test_cs; fi
after_success:
- if [ ${TRAVIS_PHP_VERSION:0:3} == "$CS" ] && [ "$GLPI_BRANCH" = "$AFTER_SUCCESS_BRANCH" ]; then vendor/bin/parallel-lint --exclude vendor .; fi
# let's update the documentation and locales
- if [ ${TRAVIS_PHP_VERSION:0:3} == "$CS" ] && [ "$GLPI_BRANCH" = "$AFTER_SUCCESS_BRANCH" ]; then tests/after_success.sh; fi
- if [ ${TRAVIS_PHP_VERSION:0:3} == "$APIDOCS_PHP" ] && [ "$GLPI_BRANCH" = "$AFTER_SUCCESS_BRANCH" ]; then tests/apidocs.sh; fi
cache:
directories:
- "$HOME/.composer/cache"
notifications:
webhooks: https://hooks.aethonan.pro/travisci/-1001061475099/
addons:
apt:
update: true
packages:
- mosquitto
- mosquitto-clients