wip github actions CI
authorgggeek <giunta.gaetano@gmail.com>
Tue, 7 Dec 2021 14:03:59 +0000 (14:03 +0000)
committergggeek <giunta.gaetano@gmail.com>
Tue, 7 Dec 2021 14:03:59 +0000 (14:03 +0000)
.github/workflows/ci.yml
tests/ci/setup/setup_apache.sh
tests/ci/setup/setup_php.sh

index 6771ca4..bb491ba 100644 (file)
@@ -73,8 +73,8 @@ jobs:
                     #ps auxwww
                     dpkg --list | grep php
                     ps auxwww | grep fpm
-                    pwd
-                    sudo env
+                    #pwd
+                    #sudo env
                     #systemctl status apache2.service
                     #ls -la /etc/apache2/mods-enabled
                     #ls -la /etc/apache2/conf-enabled
@@ -83,6 +83,8 @@ jobs:
                     #ls -la /etc/apache2/sites-available/
                     #sudo cat /etc/apache2/envvars
                     #sudo cat /etc/apache2/sites-available/000-default.conf
+                    ls -ltr /var/log
+                    ls -ltr /var/log/apache2
                     sudo cat /var/log/privoxy/*
                     sudo cat /var/log/apache2/error.log
                     sudo cat /var/log/apache2/other_vhosts_access.log
index e7930a6..0fb7f4e 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Install and configure apache2
 # Has to be run as admin
-# @todo make this work across all apache versions (precise to focal)
+# @todo make this work across all ubuntu versions (precise to focal)
 
 set -e
 
@@ -15,7 +15,7 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y apache2
 
 a2enmod rewrite proxy_fcgi setenvif ssl
 
-# in case mod-php was enabled (this is the case on at least github's ubuntu with php 5.x and shivammathur/setup-php)
+# in case mod-php was enabled (this is the case at least on GHA's ubuntu with php 5.x and shivammathur/setup-php)
 # @todo silence errors in a smarter way
 rm /etc/apache2/mods-enabled/php* || true
 
index 1144910..e4d1234 100755 (executable)
@@ -37,8 +37,12 @@ if [ "${PHP_VERSION}" = default ]; then
         php${PHPSUFFIX}-mbstring \
         php${PHPSUFFIX}-xdebug
 else
-    # on GHA runners ubuntu version, php 7.4 and 8.0 seem to be preinstalled. remove them if found
-
+    # on GHA runners ubuntu version, php 7.4 and 8.0 seem to be preinstalled. Remove them if found
+    for PHP_CURRENT in $(dpkg -l | grep -E 'php.+-common' | awk '{print $2}'); do
+        if [ "${PHP_CURRENT}" != "php${PHP_VERSION}-common" ]; then
+            apt-get purge -y "${PHP_CURRENT}"
+        fi
+    done
 
     DEBIAN_FRONTEND=noninteractive apt-get install -y language-pack-en-base software-properties-common
     LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php