build on PRs; nitpicks
authorgggeek <giunta.gaetano@gmail.com>
Thu, 3 Mar 2022 22:27:58 +0000 (22:27 +0000)
committergggeek <giunta.gaetano@gmail.com>
Thu, 3 Mar 2022 22:27:58 +0000 (22:27 +0000)
.github/workflows/ci.yml
tests/ci/setup/setup_php.sh

index 93b5ff7..5d1f245 100644 (file)
@@ -1,6 +1,6 @@
 name: CI
 
-on: [push]
+on: [push, pull_request]
 
 jobs:
     test:
index 03bf0be..038de3d 100755 (executable)
@@ -3,6 +3,7 @@
 # Has to be run as admin
 
 # @todo make it optional to install xdebug. It is fe. missing in sury's ppa for Xenial
+# @todo make it optional to install fpm. It is not needed for the cd workflow
 # @todo make it optional to disable xdebug ?
 
 set -e
@@ -80,6 +81,8 @@ fi
 
 service php-fpm start
 
-# configure apache
-a2enconf php${PHPVER}-fpm
-service apache2 restart
+# configure apache (if installed)
+if [ -n "$(dpkg --list | grep apache)" ]; then
+    a2enconf php${PHPVER}-fpm
+    service apache2 restart
+fi