From 52518e360861565682877793b03c8ad0d31a33d6 Mon Sep 17 00:00:00 2001 From: Steven Pelech Date: Mon, 28 Sep 2026 21:17:27 -0500 Subject: [PATCH] perf(ci): optimize workflow with nuget caching, shallow clones, and split coverage --- .github/workflows/ci.yml | 36 ++++++++++++++++-- .github/workflows/release.yml | 6 ++- .../LocalLLMServerManager.Shared.wasm | Bin 1126165 -> 1126165 bytes .../_framework/LocalLLMServerManager.Web.wasm | Bin 15125 -> 15125 bytes wwwroot/_framework/dotnet.boot.js | 6 +-- 5 files changed, 40 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8151715..9c89073 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,30 @@ on: branches: [ main ] jobs: + lint-and-typecheck: + name: Lint & Typecheck + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v7 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: 20 + cache: 'npm' + + - name: Install Dependencies + run: npm ci + + - name: Run ESLint + run: npm run lint + + - name: Run TypeScript Typecheck + run: npx tsc --noEmit + build-and-test: + name: build-and-test (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -18,13 +41,15 @@ jobs: - name: Checkout Code uses: actions/checkout@v7 - - name: Checkout Avalonia.LayoutInspector - run: git clone https://github.com/spelech/Avalonia.LayoutInspector.git ../Avalonia.LayoutInspector + - name: Checkout Avalonia.LayoutInspector (Shallow) + run: git clone --depth 1 https://github.com/spelech/Avalonia.LayoutInspector.git ../Avalonia.LayoutInspector - name: Setup .NET SDK 10.0 uses: actions/setup-dotnet@v6 with: dotnet-version: '10.0.x' + cache: true + cache-dependency-path: 'LocalLLMServerManager.slnx' - name: Restore Dependencies run: dotnet restore LocalLLMServerManager.slnx @@ -32,5 +57,10 @@ jobs: - name: Build Solution run: dotnet build LocalLLMServerManager.slnx -c Release --no-restore - - name: Run Unit Tests & Collect Code Coverage + - name: Run Unit Tests & Collect Code Coverage (Ubuntu) + if: matrix.os == 'ubuntu-latest' run: dotnet test LocalLLMServerManager.Tests/LocalLLMServerManager.Tests.csproj -c Release --no-build --collect:"XPlat Code Coverage" --nologo + + - name: Run Unit Tests (Windows) + if: matrix.os == 'windows-latest' + run: dotnet test LocalLLMServerManager.Tests/LocalLLMServerManager.Tests.csproj -c Release --no-build --nologo diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0724b60..dc61786 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,13 +17,15 @@ jobs: - name: Checkout Code uses: actions/checkout@v7 - - name: Checkout Avalonia.LayoutInspector - run: git clone https://github.com/spelech/Avalonia.LayoutInspector.git ../Avalonia.LayoutInspector + - name: Checkout Avalonia.LayoutInspector (Shallow) + run: git clone --depth 1 https://github.com/spelech/Avalonia.LayoutInspector.git ../Avalonia.LayoutInspector - name: Setup .NET 10 SDK uses: actions/setup-dotnet@v6 with: dotnet-version: '10.0.x' + cache: true + cache-dependency-path: 'LocalLLMServerManager.slnx' - name: Install WASM Workload run: dotnet workload install wasm-tools diff --git a/wwwroot/_framework/LocalLLMServerManager.Shared.wasm b/wwwroot/_framework/LocalLLMServerManager.Shared.wasm index ce0da3272766acb628f43c409fb7019c796b86bd..7df39a94b60ed6745bc6f7ebeee2ef0e3d157dfc 100644 GIT binary patch delta 197 zcmbPw&t>X8mxdO`7N!>F7M2#)7Pc1l7LFFq7OocV7M>Q~7QPn#Edp0M1cFT$ANqLd zszv|C3+S8-JRLjAaaY1N<-rvG$i{X>aDzj-j$P_ zd^tbYa&s*=N2*YjY7|hNLTXTxTGXZvb*V>v8ob0i7l+e+ai`t-GHyK|J3T5sxj5fv z=(NSmSsxoEy-kdZw2DyTGVv>^;xyHnii|97)1e5r2o5w@K**RZc!jN4>5d-n>EU7>kCnQF3Zxl3`-9QHoJYvPp7U zs)2!piJ6H(TB5OmQKCt5ibbMfT5`(fdHNEp{>BVO49N_s42cX$42D258OToo<75UC qATJFlX8?p2K%N;88vsQT8H|Cn5s(I{NCCGbJ- zmT?)^Ppe+n=U$yJw|Sm+_A$k}w%^T>lkr@V&%u$-KDuNLS=QXe+-nNMU-%(Q t?u-Nj4@MF4$Ov#CXd#a%oM2@^;w&knlQg3jCfN=mBj11TpljpQ_6PQ6Bvt?b diff --git a/wwwroot/_framework/dotnet.boot.js b/wwwroot/_framework/dotnet.boot.js index 282ce0f..22599fe 100644 --- a/wwwroot/_framework/dotnet.boot.js +++ b/wwwroot/_framework/dotnet.boot.js @@ -1,7 +1,7 @@ export const config = /*json-start*/{ "mainAssemblyName": "LocalLLMServerManager.Web.dll", "resources": { - "hash": "sha256-cUu5sp/tPue4O1eVA+84XhQmjWaZcYQ7uC2rH4hI31c=", + "hash": "sha256-CC06yhuePd/dhKLauKBxG21H9tsiKOceO36ur8h3PRM=", "jsModuleNative": [ { "name": "dotnet.native.js" @@ -131,12 +131,12 @@ export const config = /*json-start*/{ { "virtualPath": "LocalLLMServerManager.Shared.wasm", "name": "LocalLLMServerManager.Shared.wasm", - "hash": "sha256-qHVIpaXUV9uN+7lxwRWho2JNCZ4teEXaEofLBZcuGxM=" + "hash": "sha256-pGnitCyXIS1yBOTmudGbFWc4+O4Q3LzrI4AnD0ANTls=" }, { "virtualPath": "LocalLLMServerManager.Web.wasm", "name": "LocalLLMServerManager.Web.wasm", - "hash": "sha256-GnEK4p4sfPa841jBQHkkInO/of5HihM3cAfPzGqGImE=" + "hash": "sha256-C9CN+ERjyv3tUpoqGwE/HTZRWTmnq1IQvN/ee1hrs4c=" }, { "virtualPath": "Semi.Avalonia.wasm",