test(ci): add timeout to _gh_available to prevent hang on Forgejo runner
Some checks failed
CI / bootstrap (push) Successful in 5s
CI / typecheck (push) Failing after 14s
CI / complexity (push) Successful in 43s
CI / test (3.12) (push) Successful in 2m30s
CI / test (3.13) (push) Successful in 2m32s
CI / test (3.14) (push) Successful in 2m26s
CI / lint (push) Successful in 29s
Some checks failed
CI / bootstrap (push) Successful in 5s
CI / typecheck (push) Failing after 14s
CI / complexity (push) Successful in 43s
CI / test (3.12) (push) Successful in 2m30s
CI / test (3.13) (push) Successful in 2m32s
CI / test (3.14) (push) Successful in 2m26s
CI / lint (push) Successful in 29s
This commit is contained in:
parent
9dabc57d9a
commit
ab0c3dd68d
3 changed files with 6 additions and 3 deletions
|
|
@ -42,10 +42,11 @@ def _gh_available() -> bool:
|
||||||
["gh", "auth", "status"],
|
["gh", "auth", "status"],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
check=False,
|
check=False,
|
||||||
|
timeout=10,
|
||||||
).returncode
|
).returncode
|
||||||
== 0
|
== 0
|
||||||
)
|
)
|
||||||
except FileNotFoundError:
|
except (FileNotFoundError, subprocess.TimeoutExpired):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,11 @@ def _gh_available() -> bool:
|
||||||
["gh", "auth", "status"],
|
["gh", "auth", "status"],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
check=False,
|
check=False,
|
||||||
|
timeout=10,
|
||||||
).returncode
|
).returncode
|
||||||
== 0
|
== 0
|
||||||
)
|
)
|
||||||
except FileNotFoundError:
|
except (FileNotFoundError, subprocess.TimeoutExpired):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,10 +43,11 @@ def _gh_available() -> bool:
|
||||||
["gh", "auth", "status"],
|
["gh", "auth", "status"],
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
check=False,
|
check=False,
|
||||||
|
timeout=10,
|
||||||
).returncode
|
).returncode
|
||||||
== 0
|
== 0
|
||||||
)
|
)
|
||||||
except FileNotFoundError:
|
except (FileNotFoundError, subprocess.TimeoutExpired):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue