#!/bin/bash # Setup script for SRF Play Plugin Tests # This script helps set up the testing environment echo "=== SRF Play Plugin - Test Environment Setup ===" echo # Check .NET version echo "Checking .NET installation..." dotnet --version echo # Check SDKs echo "Installed .NET SDKs:" dotnet --list-sdks echo # Check runtimes echo "Installed .NET Runtimes:" dotnet --list-runtimes echo # Check if .NET 8 runtime is installed if dotnet --list-runtimes | grep -q "Microsoft.NETCore.App 8."; then echo "✓ .NET 8 runtime is installed" NET8_INSTALLED=true else echo "✗ .NET 8 runtime is NOT installed" NET8_INSTALLED=false fi # Check if ASP.NET Core 9 runtime is installed if dotnet --list-runtimes | grep -q "Microsoft.AspNetCore.App 9."; then echo "✓ ASP.NET Core 9 runtime is installed" ASPNET9_INSTALLED=true else echo "✗ ASP.NET Core 9 runtime is NOT installed" ASPNET9_INSTALLED=false fi echo echo "=== Test Execution Options ===" echo if [ "$NET8_INSTALLED" = true ]; then echo "✅ Ready to run tests with .NET 8" echo " dotnet test" echo else echo "⚠️ .NET 8 runtime required (to match Jellyfin requirements)" echo echo "Install .NET 8:" echo " For Arch Linux/CachyOS:" echo " sudo pacman -S dotnet-sdk-8.0 aspnet-runtime-8.0" echo echo " Or download from:" echo " https://dotnet.microsoft.com/download/dotnet/8.0" echo fi echo "Option 3: Run tests in GitHub Actions (always works)" echo " - Tests run automatically on push/PR" echo " - Nightly API tests run at 2 AM UTC" echo echo "=== Quick Test Commands ===" echo "Build: dotnet build" echo "All tests: dotnet test" echo "Unit tests: dotnet test --filter \"Category!=Integration&Category!=APISpec\"" echo "API tests: dotnet test --filter \"Category=APISpec\"" echo echo "For more information, see TESTING_GUIDE.md"