Skip to content

Commit f9bb38b

Browse files
authored
Set timeout for jobs in Github Actions (#6545)
* Set timeout for jobs in Github Actions Sometimes tests are getting frozen(most likely an issue with `pytest-xdist`), and sometimes the pip resolver is slow due to some weird constraints set by us or one of our dependencies. The default timeout is 360 minutes (6hrs), but our test completes on ~18 minutes at maximum, so I think 30mins should be enough to account for occasional CI slowdown. Also keeping the total job timeout at 45 mins, we usually require just 4 mins of extra time to do installation and setup but giving it 11 more minutes just in case. Similarly, `lint` completes in <5 mins usually, but giving it a 10 mins timeout. This should give us early feedback on the issue. * Update setup.cfg * Update setup.cfg
1 parent f7a82f6 commit f9bb38b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/tests.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313

1414
jobs:
1515
lint:
16+
timeout-minutes: 10
1617
runs-on: ubuntu-latest
1718
steps:
1819
- uses: actions/[email protected]
@@ -32,6 +33,7 @@ jobs:
3233
run: python setup.py checkdocs
3334
- uses: pre-commit/[email protected]
3435
tests:
36+
timeout-minutes: 45
3537
runs-on: ${{ matrix.os }}
3638
strategy:
3739
fail-fast: false
@@ -97,6 +99,7 @@ jobs:
9799
run: |
98100
echo "extra_test_args=--disable-gdrive" >> $GITHUB_ENV
99101
- name: run tests
102+
timeout-minutes: 30
100103
env:
101104
GDRIVE_CREDENTIALS_DATA: ${{ secrets.GDRIVE_CREDENTIALS_DATA }}
102105
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ known_first_party=dvc,tests
1717
line_length=79
1818

1919
[tool:pytest]
20-
timeout = 600
20+
timeout = 200
2121
timeout_method = thread
2222
log_level = debug
2323
addopts = -ra

0 commit comments

Comments
 (0)