Add .forgejo/workflows/validate.yml
All checks were successful
Validate Code / validate (push) Successful in 14s
All checks were successful
Validate Code / validate (push) Successful in 14s
This commit is contained in:
parent
2547ea5246
commit
46cdb6364d
1 changed files with 30 additions and 0 deletions
30
.forgejo/workflows/validate.yml
Normal file
30
.forgejo/workflows/validate.yml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
name: Validate Code
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: linux-dev
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check PHP syntax
|
||||
run: |
|
||||
if find . -name "*.php" | grep -q .; then
|
||||
find . -name "*.php" -print0 | xargs -0 -n1 php -l
|
||||
else
|
||||
echo "No PHP files found."
|
||||
fi
|
||||
|
||||
- name: Check C# build
|
||||
run: |
|
||||
if find . -name "*.csproj" | grep -q .; then
|
||||
dotnet build
|
||||
else
|
||||
echo "No C# project found."
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue