From: gggeek Date: Sun, 13 Dec 2020 13:25:43 +0000 (+0000) Subject: travis tests X-Git-Tag: plcapi-7.1-0~3^2~139 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9d4b72a3d2eac50750399d22102bcecb6ad17202;p=plcapi.git travis tests --- diff --git a/.travis.yml b/.travis.yml index dc0e444..c564652 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,31 +34,17 @@ php: before_install: # This is mandatory or the 'apt-get install' calls following will fail - sudo apt-get update -qq - #- sudo apt-get install -y apache2 libapache2-mod-fastcgi - #- sudo apt-get install -y privoxy - - sudo pwd - - sudo ls -la + # Just in case there are git misconfigurations: make sure scripts are executable - sudo chmod 755 ./tests/ci/setup/*.sh - sudo ./tests/ci/setup/setup_apache.sh - sudo ./tests/ci/setup/setup_privoxy.sh - sudo ./tests/ci/setup/setup_php.sh - # Disable xdebug for speed (executing composer), but allow us to re-enable it later - # @todo move to setup_php - #- export XDEBUG_INI=`php -i | grep xdebug.ini | grep home/travis | grep -v '=>' | head -1` - #- export XDEBUG_INI=${XDEBUG_INI/,/} - #- if [ "$XDEBUG_INI" != "" ]; then mv "$XDEBUG_INI" "$XDEBUG_INI.bak"; fi - install: - composer install before_script: - # Set up Apache and Privoxy instances inside the Travis VM and use them for testing against - #- sudo ./tests/ci/setup/setup_apache.sh - #- sudo ./tests/ci/setup/setup_php.sh - #- sudo ./tests/ci/setup/setup_privoxy.sh - - # output what version of phpunit we got going + # Output what version of phpunit we got going - ./vendor/bin/phpunit --version script: diff --git a/tests/ci/setup/setup_php.sh b/tests/ci/setup/setup_php.sh index 36bb116..f8d69e0 100644 --- a/tests/ci/setup/setup_php.sh +++ b/tests/ci/setup/setup_php.sh @@ -15,7 +15,7 @@ configure_php_ini() { fi } -if ! which php >/dev/null; then +if [ -n "$TRAVIS" ]; then # install php PHP_VERSION="$1" @@ -68,9 +68,8 @@ if ! which php >/dev/null; then # configure apache a2enconf php${PHPVER}-fpm service apache2 restart -fi -if [ -n "$TRAVIS" ]; then +else # php is already installed, via phpenv @@ -99,7 +98,7 @@ if [ -n "$TRAVIS" ]; then ~/.phpenv/versions/${PHPVER}/sbin/php-fpm - # @todo configure apache for php-fpm via mod_proxy_fcgi + # @todo configure apache for php-fpm via mod_proxy_fcgi... a2enconf php${PHPVER}-fpm service apache2 restart fi