feat: support health check score in repo.toml
All checks were successful
build / build (push) Successful in 1m53s
All checks were successful
build / build (push) Successful in 1m53s
This commit is contained in:
parent
11ca053704
commit
a7a2300f03
|
@ -27,3 +27,4 @@ class Config(BaseModel):
|
||||||
root: Path = Path(".")
|
root: Path = Path(".")
|
||||||
path: Path = Path("repo.toml")
|
path: Path = Path("repo.toml")
|
||||||
grading_repo_name: str = f"{socket.gethostname().split('-')[0]}-joj"
|
grading_repo_name: str = f"{socket.gethostname().split('-')[0]}-joj"
|
||||||
|
health_check_score: int = Field(1)
|
||||||
|
|
|
@ -88,7 +88,10 @@ def get_health_check_stage(repo_conf: repo.Config) -> result.StageDetail:
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
parsers=[
|
parsers=[
|
||||||
result.Parser(name="healthcheck", with_=result.ScoreConfig(score=1)),
|
result.Parser(
|
||||||
|
name="healthcheck",
|
||||||
|
with_=result.ScoreConfig(score=repo_conf.health_check_score),
|
||||||
|
),
|
||||||
result.Parser(name="debug", with_=result.ScoreConfig(score=0)),
|
result.Parser(name="debug", with_=result.ScoreConfig(score=0)),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user