File size: 787 Bytes
914f576
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/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"