-
-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathTestEnvironment.cs
More file actions
21 lines (18 loc) · 726 Bytes
/
TestEnvironment.cs
File metadata and controls
21 lines (18 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System;
namespace Sentry.Testing;
public static class TestEnvironment
{
/// <summary>
/// See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
/// </summary>
public static bool IsGitHubActions
{
get
{
var isGitHubActions = Environment.GetEnvironmentVariable("GITHUB_ACTIONS");
return isGitHubActions?.Equals("true", StringComparison.OrdinalIgnoreCase) == true;
}
}
public static bool IsWinX64 => RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
&& RuntimeInformation.OSArchitecture == Architecture.X64;
}