github wf

This commit is contained in:
jokob-sk
2025-06-01 14:32:39 +10:00
parent b4addd9630
commit 7fa76346b4
2 changed files with 10 additions and 4 deletions

View File

@@ -17,15 +17,21 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Check for absolute path URLs
- name: Check for invalid relative 'php/' URLs in frontend code
run: |
if grep -rE "['\"]\/php\/" --include=\*.{js,php} .; then
echo "❌ Found absolute path URLs starting with '/php/'. Please use relative paths."
echo "🔍 Checking for relative 'php/' URLs that should be './php/' or '/php/'..."
MATCHES=$(grep -rE "['\"]php\/" --include=\*.{js,php,html} . | grep -E "\.get|\.post|\.ajax|fetch|url\s*:") || true
if [ -n "$MATCHES" ]; then
echo "$MATCHES"
echo "❌ Found improperly relative 'php/' URLs. Use './php/' or '/php/' or a base path."
exit 1
else
echo "✅ No absolute path URLs found."
echo "✅ No bad relative 'php/' URLs found."
fi
- name: Check Python syntax
run: |
set -e