From 58781090d5a6c5c84843ebc467eafef5138d748b Mon Sep 17 00:00:00 2001 From: lufia Date: Mon, 17 Oct 2022 18:00:07 +0900 Subject: [PATCH] Increase default timeout: 1m -> 5m (#297) --- src/run.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/run.ts b/src/run.ts index 2fd55d5..e4a0599 100644 --- a/src/run.ts +++ b/src/run.ts @@ -109,6 +109,8 @@ const printOutput = (res: ExecRes): void => { } } +const defaultTimeout = `5m` + async function runLint(lintPath: string, patchPath: string): Promise { const debug = core.getInput(`debug`) if (debug.split(`,`).includes(`cache`)) { @@ -131,6 +133,9 @@ async function runLint(lintPath: string, patchPath: string): Promise { throw new Error(`please, don't change out-format for golangci-lint: it can be broken in a future`) } addedArgs.push(`--out-format=github-actions`) + if (!userArgNames.has(`timeout`)) { + addedArgs.push(`--timeout=${defaultTimeout}`) + } if (patchPath) { if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {