Skip to content

Commit fcce75f

Browse files
committed
Use reruns for 3.13+Windows flakes only
1 parent 0c7bf69 commit fcce75f

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

.github/workflows/test-single.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,13 @@ jobs:
253253
run: |
254254
mv chia/ notchia/
255255
256+
- name: Test blockchain code with pytest with windows and 3.13 and reruns
257+
if: matrix.os.name == 'windows' && matrix.python.name == '3.13'
258+
run: |
259+
pytest --reruns 1 --cov=chia --cov-config=.coveragerc --cov-report= -o 'junit_suite_name=${{ env.JOB_FILE_NAME }}' --junitxml='junit-data/junit.${{ env.JOB_FILE_NAME }}.xml' --durations=10 ${{ matrix.configuration.pytest_parallel_args[matrix.os.matrix] }} -m "not benchmark" ${{ env.ENABLE_PYTEST_MONITOR }} ${{ matrix.configuration.test_files }}
260+
256261
- name: Test blockchain code with pytest
262+
if: ${{ !(matrix.os.name == 'windows' && matrix.python.name == '3.13') }}
257263
env:
258264
ENABLE_PYTEST_MONITOR: ${{ matrix.os.matrix == 'ubuntu' && matrix.configuration.enable_pytest_monitor || '' }}
259265
run: |

poetry.lock

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3010,6 +3010,23 @@ pytest = "*"
30103010
requests = "*"
30113011
wheel = "*"
30123012

3013+
[[package]]
3014+
name = "pytest-rerunfailures"
3015+
version = "16.1"
3016+
description = "pytest plugin to re-run tests to eliminate flaky failures"
3017+
optional = true
3018+
python-versions = ">=3.10"
3019+
groups = ["main"]
3020+
markers = "extra == \"dev\""
3021+
files = [
3022+
{file = "pytest_rerunfailures-16.1-py3-none-any.whl", hash = "sha256:5d11b12c0ca9a1665b5054052fcc1084f8deadd9328962745ef6b04e26382e86"},
3023+
{file = "pytest_rerunfailures-16.1.tar.gz", hash = "sha256:c38b266db8a808953ebd71ac25c381cb1981a78ff9340a14bcb9f1b9bff1899e"},
3024+
]
3025+
3026+
[package.dependencies]
3027+
packaging = ">=17.1"
3028+
pytest = ">=7.4,<8.2.2 || >8.2.2"
3029+
30133030
[[package]]
30143031
name = "pytest-xdist"
30153032
version = "3.8.0"
@@ -3969,11 +3986,11 @@ url = "https://pypi.chia.net/simple"
39693986
reference = "chia"
39703987

39713988
[extras]
3972-
dev = ["aiohttp_cors", "build", "coverage", "diff-cover", "lxml", "mypy", "pre-commit", "py3createtorrent", "pyinstaller", "pytest", "pytest-cov", "pytest-mock", "pytest-monitor", "pytest-xdist", "ruff", "tach", "types-aiofiles", "types-cryptography", "types-pyyaml", "types-setuptools"]
3989+
dev = ["aiohttp_cors", "build", "coverage", "diff-cover", "lxml", "mypy", "pre-commit", "py3createtorrent", "pyinstaller", "pytest", "pytest-cov", "pytest-mock", "pytest-monitor", "pytest-rerunfailures", "pytest-xdist", "ruff", "tach", "types-aiofiles", "types-cryptography", "types-pyyaml", "types-setuptools"]
39733990
legacy-keyring = ["keyrings.cryptfile"]
39743991
upnp = ["miniupnpc"]
39753992

39763993
[metadata]
39773994
lock-version = "2.1"
39783995
python-versions = ">=3.10, <4"
3979-
content-hash = "fe24321b254e2aeaaebfc2ffdae3e29b58705c518e9bc53aa3ad3728efbb8188"
3996+
content-hash = "8174ff43e3ed9ac6cc494a6fcbabb8e9c6b0efd47cefb9f1270f074649033919"

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ pytest-cov = { version = ">=5.0.0", optional = true }
9797
pytest-mock = { version = ">=3.14.0", optional = true }
9898
pytest-monitor = { version = ">=1.6.6", platform = "linux", optional = true }
9999
pytest-xdist = { version = ">=3.6.1", optional = true }
100+
pytest-rerunfailures = { version = ">=16.1, <17.0", optional = true }
100101
tach = { version = ">=0.29.0", optional = true }
101102
types-aiofiles = { version = ">=24.1.0.20240626", optional = true }
102103
types-cryptography = { version = ">=3.3.23.2", optional = true }
@@ -111,7 +112,7 @@ miniupnpc = {version = ">=2.3.2, <3", source = "chia", optional = true}
111112
ruff = { version = ">=0.8.1", optional = true }
112113

113114
[project.optional-dependencies]
114-
dev = ["aiohttp_cors", "build", "coverage", "diff-cover", "mypy", "pre-commit", "py3createtorrent", "pyinstaller", "pytest", "pytest-cov", "pytest-mock", "pytest-monitor", "pytest-xdist", "ruff", "tach", "types-aiofiles", "types-cryptography", "types-pyyaml", "types-setuptools", "lxml"]
115+
dev = ["aiohttp_cors", "build", "coverage", "diff-cover", "mypy", "pre-commit", "py3createtorrent", "pyinstaller", "pytest", "pytest-cov", "pytest-mock", "pytest-monitor", "pytest-xdist", "pytest-rerunfailures", "ruff", "tach", "types-aiofiles", "types-cryptography", "types-pyyaml", "types-setuptools", "lxml"]
115116
upnp = ["miniupnpc"]
116117
legacy_keyring = ["keyrings.cryptfile"]
117118

0 commit comments

Comments
 (0)