Skip to content

Commit 9808ce4

Browse files
author
Marc Stern
committed
CI improvement: First check syntax & always display error/audit logs
1 parent 28b6e1d commit 9808ce4

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ jobs:
4545
sudo cp unicode.mapping /etc/apache2/
4646
sudo mkdir -p /var/cache/modsecurity
4747
sudo chown -R www-data:www-data /var/cache/modsecurity
48+
- name: first check config (to get syntax errors)
49+
run: sudo apachectl configtest
4850
- name: start apache with module
49-
run: |
50-
sudo systemctl restart apache2.service
51-
sudo cat /var/log/apache2/error.log
52-
51+
run: sudo systemctl restart apache2.service
52+
- name: Show httpd error log
53+
if: always()
54+
run: sudo cat /var/log/apache2/error.log
55+
- name: Show mod_security2 audit log
56+
if: always()
57+
run: sudo cat /var/log/apache2/modsec_audit.log
58+
# For non-regression tests: /home/runner/work/ModSecurity/ModSecurity/tests/regression/server_root/logs/audit/audit.log

0 commit comments

Comments
 (0)