test
This commit is contained in:
parent
cff78d1230
commit
49b14d5d03
2 changed files with 28 additions and 14 deletions
12
reports/errors.md
Normal file
12
reports/errors.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Validation Summary
|
||||
|
||||
- Files Checked: 3
|
||||
- Warnings: 1
|
||||
- Errors: 1
|
||||
|
||||
## Detailed Results
|
||||
|
||||
- OK: bash -n passed: tools/validate-code.sh
|
||||
- OK: bash -n passed: tools/project-report.sh
|
||||
- Warning: yamllint not installed; skipping validate.yml
|
||||
- Error: php -l failed: index.php \| Errors parsing /home/dev/Documents/customer-test/index.php \| PHP Parse error: syntax error, unexpected end of file, expecting "," or ";" in /home/dev/Documents/customer-test/index.php on line 5
|
||||
26
validate.yml
26
validate.yml
|
|
@ -9,21 +9,23 @@ jobs:
|
|||
runs-on: linux-dev
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check PHP syntax
|
||||
- name: Run validation
|
||||
run: |
|
||||
if find . -name "*.php" | grep -q .; then
|
||||
find . -name "*.php" -print0 | xargs -0 -n1 php -l
|
||||
chmod +x tools/validate-code.sh
|
||||
|
||||
./tools/validate-code.sh || {
|
||||
echo ""
|
||||
echo "===== VALIDATION FAILED ====="
|
||||
echo ""
|
||||
|
||||
if [ -f reports/errors.md ]; then
|
||||
cat reports/errors.md
|
||||
else
|
||||
echo "No PHP files found."
|
||||
echo "No reports/errors.md file was created."
|
||||
fi
|
||||
|
||||
- name: Check C# build
|
||||
run: |
|
||||
if find . -name "*.csproj" | grep -q .; then
|
||||
dotnet build
|
||||
else
|
||||
echo "No C# project found."
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue