forked from leanprover-community/queueboard-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci_status.py
More file actions
25 lines (23 loc) · 821 Bytes
/
ci_status.py
File metadata and controls
25 lines (23 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from enum import Enum, auto
class CIStatus(Enum):
# All build jobs pass (or are skipped).
Pass = auto()
# Some build job fails which is not "inessential" (see below).
Fail = auto()
# Some build job fails, but all failing jobs are (usually) spurious failures,
# or related to defects in the infrastructure.
# Unless a PR actively modifies such infrastructure, this is not a bug in the PR.
FailInessential = auto()
# CI is currently running
Running = auto()
# Missing data.
Missing = auto()
@staticmethod
def from_string(s: str):
return {
"pass": CIStatus.Pass,
"fail": CIStatus.Fail,
"fail-inessential": CIStatus.FailInessential,
"running": CIStatus.Running,
None: CIStatus.Missing,
}[s]