From 7a3981b42bc8f72f172b0ba7e327ca842ca42939 Mon Sep 17 00:00:00 2001 From: Kaan Date: Sun, 1 Jun 2025 20:34:44 +0200 Subject: [PATCH] Made workflow, building and such more Avalonia specific --- .gitea/workflows/ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index bc4de7b..ae33077 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Code Quality +name: Avalonia Code Quality on: push: @@ -18,7 +18,7 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v3 with: - dotnet-version: '9.0.300' + dotnet-version: '8.0.x' - name: Restore dependencies run: dotnet restore @@ -26,13 +26,28 @@ jobs: - name: Check code formatting 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 + - 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) run: | if find . -name "*Test*.csproj" | grep -q .; then dotnet test --configuration Release --no-build --verbosity minimal else 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 \ No newline at end of file