travis tests
authorgggeek <giunta.gaetano@gmail.com>
Sun, 13 Dec 2020 13:25:43 +0000 (13:25 +0000)
committergggeek <giunta.gaetano@gmail.com>
Sun, 13 Dec 2020 13:25:43 +0000 (13:25 +0000)
.travis.yml
tests/ci/setup/setup_php.sh

index dc0e444..c564652 100644 (file)
@@ -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:
index 36bb116..f8d69e0 100644 (file)
@@ -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