test
This commit is contained in:
parent
cff78d1230
commit
49b14d5d03
2 changed files with 28 additions and 14 deletions
30
validate.yml
30
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
|
||||
else
|
||||
echo "No PHP files found."
|
||||
fi
|
||||
chmod +x tools/validate-code.sh
|
||||
|
||||
- name: Check C# build
|
||||
run: |
|
||||
if find . -name "*.csproj" | grep -q .; then
|
||||
dotnet build
|
||||
else
|
||||
echo "No C# project found."
|
||||
fi
|
||||
./tools/validate-code.sh || {
|
||||
echo ""
|
||||
echo "===== VALIDATION FAILED ====="
|
||||
echo ""
|
||||
|
||||
if [ -f reports/errors.md ]; then
|
||||
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