fix: 尝试用 base64 输出错误详情
Test CI / 快速测试 (push) Failing after 2s

This commit is contained in:
2026-03-01 23:54:11 +08:00
parent b6fffab885
commit 7d43eaabdc
+17 -3
View File
@@ -22,10 +22,24 @@ jobs:
- name: PHP 语法检查
run: |
set -e
echo "📝 PHP 语法检查..."
find . -name "*.php" -not -path "./vendor/*" -print0 | xargs -0 -n1 php -l
echo "✅ 所有 PHP 文件语法正确"
# 检查每个 PHP 文件
for file in $(find . -name "*.php" -not -path "./vendor/*"); do
php -l "$file" > /tmp/lint_$file.txt 2>&1 || true
done
# 合并所有输出
cat /tmp/lint_*.txt > /tmp/all_lint.txt
# 检查是否有错误
if grep -q "Parse error\|Fatal error\|Syntax error" /tmp/all_lint.txt; then
echo "❌ PHP 语法错误详情:"
base64 /tmp/all_lint.txt
exit 1
else
echo "✅ 所有 PHP 文件语法正确"
fi
# 单元测试
test: