forked from OrchardCMS/OrchardCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't run SRI locally be default (OrchardCMS#15486)
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using SystemEnvironment = System.Environment; | ||
|
||
namespace OrchardCore.Tests; | ||
|
||
public class CIFactAttribute : FactAttribute | ||
{ | ||
public override string Skip | ||
{ | ||
get | ||
{ | ||
// "CI" is defined by GitHub actions | ||
// "BUILD_BUILDID" is defined by Azure DevOps | ||
if (SystemEnvironment.GetEnvironmentVariable("BUILD_BUILDID") == null && | ||
SystemEnvironment.GetEnvironmentVariable("CI") == null) | ||
{ | ||
return $"{nameof(CIFactAttribute)} tests are not run locally. To run them locally create a \"CI\" environment variable."; | ||
} | ||
|
||
return null!; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters