You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2026/08/30 07:58:11 UTC
svn commit: r1937641 - httpd/httpd/trunk/test
Author: jorton
Date: Sun Aug 30 07:58:11 2026
New Revision: 1937641
Log:
* test/gha-sanity-check.sh: New script, checking that the workflow files
parse as YAML and that the scripts they run pass a shell syntax check.
[skip ci]
Co-Authored-By: Claude Opus 5 (1M context) <no...@anthropic.com>
Added:
httpd/httpd/trunk/test/gha-sanity-check.sh (contents, props changed)
Added: httpd/httpd/trunk/test/gha-sanity-check.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ httpd/httpd/trunk/test/gha-sanity-check.sh Sun Aug 30 07:58:11 2026 (r1937641)
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# Sanity-check the CI inputs: the GitHub Actions workflow files must
+# parse as YAML, and the scripts those workflows run must pass a shell
+# syntax check. Neither is exercised by the build, so run this before
+# pushing a change to either.
+
+cd "`dirname "$0"`/.." || exit 1
+
+rv=0
+
+if python3 -c 'import yaml' 2>/dev/null; then
+ for f in .github/workflows/*.yml; do
+ if python3 -c 'import sys, yaml; yaml.safe_load(open(sys.argv[1]))' "$f"; then
+ echo "PASS: $f"
+ else
+ echo "FAIL: $f"
+ rv=1
+ fi
+ done
+else
+ echo "SKIP: .github/workflows/*.yml, python3 has no yaml module"
+fi
+
+for f in test/travis*.sh test/gha*.sh; do
+ if bash -n "$f"; then
+ echo "PASS: $f"
+ else
+ echo "FAIL: $f"
+ rv=1
+ fi
+done
+
+exit $rv