Add timeouts to CI jobs (#63491)

This commit is contained in:
Marc Mueller 2022-01-05 18:53:47 +01:00 committed by GitHub
parent ef02f2005a
commit 6873b02858
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,6 +132,7 @@ jobs:
prepare-base: prepare-base:
name: Prepare base dependencies name: Prepare base dependencies
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20
outputs: outputs:
python-key: ${{ steps.generate-python-key.outputs.key }} python-key: ${{ steps.generate-python-key.outputs.key }}
pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }} pre-commit-key: ${{ steps.generate-pre-commit-key.outputs.key }}
@ -520,6 +521,7 @@ jobs:
prepare-tests: prepare-tests:
name: Prepare tests for Python ${{ matrix.python-version }} name: Prepare tests for Python ${{ matrix.python-version }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30
strategy: strategy:
matrix: matrix:
python-version: [3.8, 3.9] python-version: [3.8, 3.9]
@ -585,6 +587,7 @@ jobs:
pylint: pylint:
name: Check pylint name: Check pylint
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20
needs: needs:
- changes - changes
- prepare-tests - prepare-tests
@ -712,6 +715,7 @@ jobs:
echo "::add-matcher::.github/workflows/matchers/pytest-slow.json" echo "::add-matcher::.github/workflows/matchers/pytest-slow.json"
- name: Run pytest (fully) - name: Run pytest (fully)
if: needs.changes.outputs.test_full_suite == 'true' if: needs.changes.outputs.test_full_suite == 'true'
timeout-minutes: 45
run: | run: |
. venv/bin/activate . venv/bin/activate
python3 -X dev -m pytest \ python3 -X dev -m pytest \
@ -729,6 +733,7 @@ jobs:
tests tests
- name: Run pytest (partially) - name: Run pytest (partially)
if: needs.changes.outputs.test_full_suite == 'false' && matrix.python-version != '3.8' if: needs.changes.outputs.test_full_suite == 'false' && matrix.python-version != '3.8'
timeout-minutes: 10
run: | run: |
. venv/bin/activate . venv/bin/activate
python3 -X dev -m pytest \ python3 -X dev -m pytest \
@ -746,6 +751,7 @@ jobs:
tests/components/${{ matrix.group }} tests/components/${{ matrix.group }}
- name: Run pytest (partially); no coverage - name: Run pytest (partially); no coverage
if: needs.changes.outputs.test_full_suite == 'false' && matrix.python-version == '3.8' if: needs.changes.outputs.test_full_suite == 'false' && matrix.python-version == '3.8'
timeout-minutes: 10
run: | run: |
. venv/bin/activate . venv/bin/activate
python3 -X dev -m pytest \ python3 -X dev -m pytest \