diff options
Diffstat (limited to 'htesting/test_helpers.go')
-rw-r--r-- | htesting/test_helpers.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/htesting/test_helpers.go b/htesting/test_helpers.go index b584f4ca0..813c9bd04 100644 --- a/htesting/test_helpers.go +++ b/htesting/test_helpers.go @@ -88,6 +88,18 @@ func DiffStrings(s1, s2 string) []string { return DiffStringSlices(strings.Fields(s1), strings.Fields(s2)) } +// IsCI reports whether we're running in a CI server. func IsCI() bool { return (os.Getenv("CI") != "" || os.Getenv("CI_LOCAL") != "") && os.Getenv("CIRCLE_BRANCH") == "" } + +// IsGitHubAction reports whether we're running in a GitHub Action. +func IsGitHubAction() bool { + return os.Getenv("GITHUB_ACTION") != "" +} + +// SupportsAll reports whether the running system supports all Hugo features, +// e.g. Asciidoc, Pandoc etc. +func SupportsAll() bool { + return IsGitHubAction() +} |