Made workflow, building and such more Avalonia specific
Some checks failed
Avalonia Code Quality / Lint, Analyze & Build (push) Failing after 28s
Some checks failed
Avalonia Code Quality / Lint, Analyze & Build (push) Failing after 28s
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
name: Code Quality
|
name: Avalonia Code Quality
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -18,7 +18,7 @@ jobs:
|
|||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: '9.0.300'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore
|
run: dotnet restore
|
||||||
@ -26,13 +26,28 @@ jobs:
|
|||||||
- name: Check code formatting
|
- name: Check code formatting
|
||||||
run: dotnet format --verify-no-changes --verbosity minimal
|
run: dotnet format --verify-no-changes --verbosity minimal
|
||||||
|
|
||||||
- name: Build with static analysis
|
- name: Build Avalonia app
|
||||||
run: dotnet build --configuration Release --no-restore /p:TreatWarningsAsErrors=true
|
run: dotnet build --configuration Release --no-restore /p:TreatWarningsAsErrors=true
|
||||||
|
|
||||||
|
- name: Check XAML files
|
||||||
|
run: |
|
||||||
|
echo "Checking for XAML syntax issues..."
|
||||||
|
# This will be caught during build, but we can add specific checks
|
||||||
|
find . -name "*.axaml" -o -name "*.xaml" | wc -l | xargs echo "Found XAML files:"
|
||||||
|
|
||||||
- name: Run tests (if any exist)
|
- name: Run tests (if any exist)
|
||||||
run: |
|
run: |
|
||||||
if find . -name "*Test*.csproj" | grep -q .; then
|
if find . -name "*Test*.csproj" | grep -q .; then
|
||||||
dotnet test --configuration Release --no-build --verbosity minimal
|
dotnet test --configuration Release --no-build --verbosity minimal
|
||||||
else
|
else
|
||||||
echo "No test projects found, skipping tests"
|
echo "No test projects found, skipping tests"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Verify Avalonia dependencies
|
||||||
|
run: |
|
||||||
|
echo "Checking Avalonia package references..."
|
||||||
|
if grep -r "Avalonia\." --include="*.csproj" .; then
|
||||||
|
echo "✅ Avalonia packages found"
|
||||||
|
else
|
||||||
|
echo "⚠️ No Avalonia packages detected"
|
||||||
fi
|
fi
|
||||||
Reference in New Issue
Block a user