52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Validate Code
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
validate:
|
|
runs-on: linux-dev
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run validation
|
|
shell: bash
|
|
run: |
|
|
chmod +x tools/validate-code.sh
|
|
./tools/validate-code.sh
|
|
|
|
- name: Show validation reports
|
|
shell: bash
|
|
run: |
|
|
test -f reports/errors.md
|
|
|
|
echo "===== VALIDATION SUMMARY ====="
|
|
if test -f reports/customer-code-status.txt; then
|
|
cat reports/customer-code-status.txt
|
|
elif grep -q "CUSTOMER CODE ERRORS FOUND\|NO CUSTOMER CODE ERRORS FOUND" reports/errors.md; then
|
|
grep -m 1 "CUSTOMER CODE ERRORS FOUND\|NO CUSTOMER CODE ERRORS FOUND" reports/errors.md
|
|
else
|
|
echo "CUSTOMER CODE STATUS UNKNOWN"
|
|
fi
|
|
|
|
echo "Reports written:"
|
|
if test -f reports/generated-files.md; then
|
|
sed -n '3,$p' reports/generated-files.md
|
|
else
|
|
echo "- reports/errors.md"
|
|
fi
|
|
|
|
echo
|
|
echo "===== VALIDATION REPORT FILES ====="
|
|
if test -f reports/generated-files.md; then
|
|
cat reports/generated-files.md
|
|
else
|
|
echo "- reports/errors.md"
|
|
fi
|
|
|
|
echo
|
|
echo "===== reports/errors.md ====="
|
|
cat reports/errors.md
|