Add Cirrus CI to CIProvider enum

This commit is contained in:
jack1142
2022-08-17 15:47:39 +02:00
committed by Jakub Kuczys
parent 623b39eb5a
commit 67071395fa
4 changed files with 9 additions and 3 deletions
+3
View File
@@ -393,6 +393,7 @@ class CIProvider(Enum):
azure_pipelines = "azure_pipelines"
github_actions = "github_actions"
gitlab = "gitlab"
cirrus_ci = "cirrus_ci"
other = "other"
@@ -409,6 +410,8 @@ def detect_ci_provider() -> CIProvider | None:
return CIProvider.github_actions
elif "GITLAB_CI" in os.environ:
return CIProvider.gitlab
elif "CIRRUS_CI" in os.environ:
return CIProvider.cirrus_ci
elif strtobool(os.environ.get("CI", "false")):
return CIProvider.other
else: