Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run の timeout を無くす #422

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions onlinejudge_verify/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_parser() -> argparse.ArgumentParser:
return parser


def subcommand_run(paths: List[pathlib.Path], *, timeout: float = 600, tle: float = 60, jobs: int = 1) -> onlinejudge_verify.verify.VerificationSummary:
def subcommand_run(paths: List[pathlib.Path], *, timeout: float = math.inf, tle: float = 60, jobs: int = 1) -> onlinejudge_verify.verify.VerificationSummary:
"""
:raises Exception: if test.sh fails
"""
Expand All @@ -71,11 +71,6 @@ def subcommand_run(paths: List[pathlib.Path], *, timeout: float = 600, tle: floa
logger.info('$ git checkout %s', branch)
subprocess.check_call(['git', 'checkout', branch])

# NOTE: the GITHUB_TOKEN expires in 60 minutes (https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token#about-the-github_token-secret)
# use 10 minutes as timeout for safety; 理由はよく分かってないぽいけど以前 20 分でやって死んだことがあるらしいので
if 'GITHUB_ACTION' not in os.environ:
timeout = math.inf

if not paths:
paths = sorted(list(onlinejudge_verify.utils.iterate_verification_files()))
try:
Expand Down
Loading