From d5ae7942f4a73eecac50f18e83b9519419282a0b Mon Sep 17 00:00:00 2001 From: Oscar B Date: Wed, 10 Oct 2018 11:33:45 +0200 Subject: [PATCH] Create .travis.yml --- .travis.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e451504 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,41 @@ +language: php + +env: + global: + - GLPI_SOURCE="https://github.com/glpi-project/glpi" + - PHPUNIT_ARGS="--verbose --debug" + - CS=7.2 + matrix: + - GLPI_BRANCH=9.2.1 + - GLPI_BRANCH=9.2/bugfixes + - GLPI_BRANCH=9.3/bugfixes + - GLPI_BRANCH=master + +php: + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - nightly + +allow_failures: + - php: nightly + - env: GLPI_BRANCH=master + +before_script: + - mysql -u root -e 'create database glpitest;' + - git clone --depth=1 $GLPI_SOURCE -b $GLPI_BRANCH ../glpi && cd ../glpi + - composer install --no-dev + - if [ -e scripts/cliinstall.php ] ; then php scripts/cliinstall.php --db=glpitest --user=root --tests ; fi + - if [ -e tools/cliinstall.php ] ; then php tools/cliinstall.php --db=glpitest --user=root --tests ; fi + - mv ../GDrive plugins/GDrive + - cd plugins/GDrive + - composer install + +script: + - vendor/bin/phpunit $PHPUNIT_ARGS + - if [ ${TRAVIS_PHP_VERSION:0:3} == "$CS" ] && [ "$GLPI_BRANCH" = "$AFTER_SUCCESS_BRANCH" ]; then vendor/bin/robo --no-interaction code:cs; fi + +cache: + directories: + - $HOME/.composer/cache