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
|
||||||
30
validate.yml
30
validate.yml
|
|
@ -9,21 +9,23 @@ jobs:
|
||||||
runs-on: linux-dev
|
runs-on: linux-dev
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Check PHP syntax
|
- name: Run validation
|
||||||
run: |
|
run: |
|
||||||
if find . -name "*.php" | grep -q .; then
|
chmod +x tools/validate-code.sh
|
||||||
find . -name "*.php" -print0 | xargs -0 -n1 php -l
|
|
||||||
else
|
|
||||||
echo "No PHP files found."
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Check C# build
|
./tools/validate-code.sh || {
|
||||||
run: |
|
echo ""
|
||||||
if find . -name "*.csproj" | grep -q .; then
|
echo "===== VALIDATION FAILED ====="
|
||||||
dotnet build
|
echo ""
|
||||||
else
|
|
||||||
echo "No C# project found."
|
if [ -f reports/errors.md ]; then
|
||||||
fi
|
cat reports/errors.md
|
||||||
|
else
|
||||||
|
echo "No reports/errors.md file was created."
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue