File tree Expand file tree Collapse file tree
tests/ImageSharp.Web.Tests/TestUtilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Copyright (c) Six Labors.
22// Licensed under the Apache License, Version 2.0.
33
4+ using System ;
5+
46namespace SixLabors . ImageSharp . Web . Tests . TestUtilities
57{
68 internal static class TestEnvironment
@@ -11,7 +13,18 @@ internal static class TestEnvironment
1113#if ENV_CI
1214 internal static bool RunsOnCI => true ;
1315#else
14- internal static bool RunsOnCI => false ;
15- #endif
16+ internal static bool RunsOnCI
17+ {
18+ get
19+ {
20+ // TODO: Something weird going on with our environment constants here.
21+ // try reading the environment directly.
22+ // https://docs.github.com/en/actions/learn-github-actions/environment-variables
23+ string variable = Environment . GetEnvironmentVariable ( "CI" ) ;
24+ bool . TryParse ( variable , out bool result ) ;
25+ return result ;
26+ }
27+ }
1628 }
29+ #endif
1730}
You can’t perform that action at this time.
0 commit comments