Skip to content

Fix Codegen and Add MCPCode Generation #7

Fix Codegen and Add MCPCode Generation

Fix Codegen and Add MCPCode Generation #7

Workflow file for this run

name: PR Build
on:
pull_request:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: Restore .NET tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore RestClient.sln
- name: Check code formatting with CSharpier
run: dotnet csharpier --check .
- name: Build solution
run: dotnet build RestClient.sln --configuration Release --no-restore /warnaserror
- name: Verify Docker is available
run: |
docker --version
docker compose version
- name: Run all tests with code coverage
run: dotnet test RestClient.sln --configuration Release --no-build --verbosity normal --logger "console;verbosity=detailed" --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Threshold=100 DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ThresholdType=line,branch,method DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.ThresholdStat=total
- name: Cleanup Docker containers
if: always()
run: |
cd Samples/NucliaDbClient
docker compose down -v --remove-orphans || true
- name: Run Stryker Mutation Testing
run: dotnet stryker --break-at 100 --reporter "console" --reporter "html"
- name: Run code analysis
run: dotnet build RestClient.sln --configuration Release --no-restore /p:RunAnalyzers=true /p:TreatWarningsAsErrors=true