File: PlatformDetection.cs
Web Access
Project: src\tests\Aspire.Components.Common.Tests\Aspire.Components.Common.Tests.csproj (Aspire.Components.Common.Tests)
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
 
namespace Aspire.Components.Common.Tests;
 
public static class PlatformDetection
{
    public static bool IsRunningOnBuildMachine => Environment.GetEnvironmentVariable("BUILD_BUILDID") is not null;
    public static bool IsRunningOnHelix => Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null;
    public static bool IsRunningOnCI => IsRunningOnBuildMachine || IsRunningOnHelix;
}