Skip to content

Commit 4990592

Browse files
committed
Run tests in CI with a timeout.
1 parent 93114e2 commit 4990592

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/python-package.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
- name: Install Python dependencies
137137
run: |
138138
python -m pip install --upgrade pip
139-
pip install pytest pytest-cov pytest-benchmark build
139+
pip install pytest pytest-cov pytest-benchmark pytest-timeout build
140140
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
141141
- name: Initialize package
142142
run: |
@@ -147,11 +147,11 @@ jobs:
147147
- name: Test with pytest
148148
if: runner.os == 'Windows'
149149
run: |
150-
pytest --cov-report=xml
150+
pytest --cov-report=xml --timeout=30
151151
- name: Test with pytest (Xvfb)
152152
if: always() && runner.os != 'Windows'
153153
run: |
154-
xvfb-run -e /tmp/xvfb.log --server-num=$RANDOM --auto-servernum pytest --cov-report=xml
154+
xvfb-run -e /tmp/xvfb.log --server-num=$RANDOM --auto-servernum pytest --cov-report=xml --timeout=30
155155
- name: Xvfb logs
156156
if: runner.os != 'Windows'
157157
run: cat /tmp/xvfb.log

0 commit comments

Comments
 (0)