Skip to content

Commit 08ea35a

Browse files
committed
feat: support timeout-minutes
Closes #53
1 parent 2192f52 commit 08ea35a

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/node-test.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ on:
5353
required: false
5454
type: number
5555

56+
timeout-minutes:
57+
description: "The maximum number of minutes to let a job run before GitHub automatically cancels it."
58+
default: 360
59+
required: false
60+
type: number
61+
5662
test-command:
5763
description: "Command to run instead of `npm test` (e.g. for coverage)."
5864
default: npm test
@@ -93,6 +99,8 @@ jobs:
9399
test:
94100
needs: prepare-node-matrix
95101

102+
timeout-minutes: ${{ inputs.timeout-minutes }}
103+
96104
strategy:
97105
fail-fast: ${{ inputs.strategy-fail-fast }}
98106
max-parallel: ${{ inputs.strategy-max-parallel }}

docs/USAGE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- [`runs-on`](#runs-on)
1111
- [`strategy-fail-fast`](#strategy-fail-fast)
1212
- [`strategy-max-parallel`](#strategy-max-parallel)
13+
- [`timeout-minutes`](#timeout-minutes)
1314
- [`test-command`](#test-command)
1415
- [`upgrade-policy`](#upgrade-policy)
1516
- `secrets`
@@ -202,6 +203,13 @@ The maximum number of matrix jobs that can run simultaneously. Default is unlimi
202203
See [Github Actions documentation for `jobs.<job_id>.strategy.max-parallel`](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymax-parallel).
203204

204205

206+
### `timeout-minutes`
207+
208+
The maximum number of minutes to let a job run before GitHub automatically cancels it. Default: 360
209+
210+
See [Github Actions documentation for `jobs.<job_id>.timeout-minutes`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes).
211+
212+
205213
### `test-command`
206214

207215
Command to run instead of `npm test`.

0 commit comments

Comments
 (0)