Skip to content

Commit 88faa3b

Browse files
authored
chore(repo): Limit job/step execution time using timeout-minutes (clerk#2032)
* chore(repo): Limit job/step execution time using timeout-minutes * Create selfish-eggs-sort.md
1 parent 69711e1 commit 88faa3b

9 files changed

Lines changed: 19 additions & 1 deletion

File tree

.changeset/selfish-eggs-sort.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.github/workflows/base-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ jobs:
55
build:
66
# if: ${{ github.repository == 'clerk/javascript' }}
77
runs-on: ${{ vars.RUNNER_NORMAL }}
8+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL }}
89
steps:
910
- name: Checkout repo
1011
uses: actions/checkout@v4

.github/workflows/base-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ on:
1414
jobs:
1515
run:
1616
continue-on-error: true
17-
timeout-minutes: 60
1817
runs-on: ${{ vars.RUNNER_NORMAL }}
18+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_LONG }}
1919
concurrency:
2020
group: integration-${{ github.ref }}-${{ inputs.script }}
2121
cancel-in-progress: true

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ jobs:
1717
formatting-linting:
1818
name: Formatting, linting & changeset checks
1919
runs-on: ${{ vars.RUNNER_NORMAL }}
20+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL }}
2021

2122
steps:
2223
- name: Checkout Repo
24+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT }}
2325
uses: actions/checkout@v4
2426
with:
2527
fetch-depth: 0
2628
show-progress: false
2729

2830
- name: Setup
31+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT }}
2932
id: config
3033
uses: ./.github/actions/init
3134
with:
@@ -44,25 +47,31 @@ jobs:
4447
echo "FORCE_COLOR: $FORCE_COLOR"
4548
4649
- name: Require Changeset
50+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT }}
4751
run: if [ "${{ github.event.pull_request.user.login }}" = "clerk-cookie" ]; then echo 'Skipping' && exit 0; else npx changeset status --since=origin/main; fi
4852

4953
- name: Check Formatting
54+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT }}
5055
run: npm run format:check
5156

5257
- name: Lint packages using publint
58+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT }}
5359
run: npm run lint:publint -- $TURBO_ARGS
5460

5561
- name: Lint types using attw
62+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT }}
5663
run: npm run lint:attw -- $TURBO_ARGS
5764
continue-on-error: true # TODO: Remove this when all related errors are fixed
5865

5966
- name: Run lint
67+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT }}
6068
run: npm run lint -- $TURBO_ARGS -- --quiet
6169

6270
unit-tests:
6371
name: Unit Tests
6472
needs: formatting-linting
6573
runs-on: ${{ vars.RUNNER_LARGE }}
74+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL }}
6675

6776
strategy:
6877
matrix:
@@ -93,6 +102,7 @@ jobs:
93102
name: Integration Tests
94103
needs: formatting-linting
95104
runs-on: ${{ vars.RUNNER_LARGE }}
105+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL }}
96106

97107
strategy:
98108
matrix:

.github/workflows/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
jobs:
77
triage:
8+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT }}
89
permissions:
910
contents: read
1011
pull-requests: write

.github/workflows/lock-threads.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ concurrency:
1717

1818
jobs:
1919
action:
20+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT }}
2021
runs-on: ${{ vars.RUNNER_NORMAL }}
2122
steps:
2223
- uses: actions/stale@v8

.github/workflows/release-snapshot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
snapshot-release:
1414
if: ${{ startsWith(github.event.comment.body, '!snapshot') && github.repository == 'clerk/javascript' && github.event.issue.pull_request }}
1515
runs-on: ${{ vars.RUNNER_LARGE }}
16+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL }}
1617
env:
1718
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1819
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

.github/workflows/release-staging.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
staging-release:
1515
if: ${{ github.repository == 'clerk/javascript' }}
1616
runs-on: ${{ vars.RUNNER_NORMAL }}
17+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL }}
1718
env:
1819
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1920
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
name: Release
1717
if: ${{ github.repository == 'clerk/javascript' }}
1818
runs-on: ${{ vars.RUNNER_NORMAL }}
19+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_NORMAL }}
1920
permissions:
2021
contents: write
2122
id-token: write

0 commit comments

Comments
 (0)