#!/usr/bin/env bash set -euo pipefail echo "๐Ÿ”จ Building C# project" echo "========================" # Check .NET SDK if ! command -v dotnet &> /dev/null; then echo "โŒ .NET SDK not found. Install from https://dotnet.microsoft.com/download" exit 1 fi DOTNET_VERSION=$(dotnet --version) echo "โœ“ .NET SDK $DOTNET_VERSION" # Restore dependencies echo "" echo "๐Ÿ“ฆ Restoring packages..." dotnet restore # Build echo "" echo "๐Ÿ”จ Building..." dotnet build --no-restore --configuration Release # Run tests echo "" echo "๐Ÿงช Running tests..." dotnet test --no-build --verbosity normal --collect:"XPlat Code Coverage" echo "" echo "โœ… Build and tests complete!" echo " Release binary: bin/Release/net8.0/" echo " Coverage report: TestResults/*/coverage.cobertura.xml"