From: gggeek Date: Tue, 7 Dec 2021 14:03:59 +0000 (+0000) Subject: wip github actions CI X-Git-Tag: plcapi-7.1-0~3^2~27 X-Git-Url: http://git.onelab.eu/?p=plcapi.git;a=commitdiff_plain;h=dee9fa79696346a745fc39bb0183e85f7383ee27 wip github actions CI --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6771ca4..bb491ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/tests/ci/setup/setup_apache.sh b/tests/ci/setup/setup_apache.sh index e7930a6..0fb7f4e 100755 --- a/tests/ci/setup/setup_apache.sh +++ b/tests/ci/setup/setup_apache.sh @@ -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 diff --git a/tests/ci/setup/setup_php.sh b/tests/ci/setup/setup_php.sh index 1144910..e4d1234 100755 --- a/tests/ci/setup/setup_php.sh +++ b/tests/ci/setup/setup_php.sh @@ -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