Skip to content

Commit 004ffcb

Browse files
authored
[tests] rerun failed tests 2 times in CI (#1150)
* rerun failed tests 1 time * Update main.yml
1 parent e9db0ff commit 004ffcb

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Create the conda environment
3333
shell: bash -l {0}
34-
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov nodejs yarn flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
34+
run: mamba install -q python=${{ matrix.python_version }} pip jupyterlab_pygments==0.1.0 pytest-cov pytest-rerunfailures nodejs yarn flake8 ipywidgets matplotlib xeus-cling openssl=1.1.1l "traitlets>=5.0.3,<6"
3535

3636
- name: Install dependencies
3737
shell: bash -l {0}
@@ -46,7 +46,7 @@ jobs:
4646
- name: Run tests
4747
shell: bash -l {0}
4848
run: |
49-
VOILA_TEST_XEUS_CLING=1 py.test tests/ --async-test-timeout=240
49+
VOILA_TEST_XEUS_CLING=1 py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1
5050
voila --help # Making sure we can run `voila --help`
5151
# tests if voila sends a 'heartbeat' to avoid proxies from closing an apparently stale connection
5252
# Note that wget is the only easily available software that has a read-timeout
@@ -82,7 +82,7 @@ jobs:
8282

8383
- name: Install dependencies
8484
run: |
85-
python -m pip install jupyterlab_pygments==0.1.0 pytest-cov flake8 ipywidgets matplotlib traitlets
85+
python -m pip install jupyterlab_pygments==0.1.0 pytest-cov pytest-rereunfailures flake8 ipywidgets matplotlib traitlets
8686
yarn install --network-timeout 100000
8787
python -m pip install ".[test]"
8888
cd tests/test_template
@@ -93,4 +93,4 @@ jobs:
9393
- name: Run test
9494
run: |
9595
set VOILA_TEST_DEBUG=1
96-
py.test tests/ --async-test-timeout=240
96+
py.test tests/ --async-test-timeout=240 --reruns 2 --reruns-delay 1

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ test =
5353
matplotlib
5454
mock
5555
pytest
56+
pytest-rerunfailures
5657
pytest-tornasync
5758

5859
visual_test =

0 commit comments

Comments
 (0)