retry failed tests 3 times

This commit is contained in:
Thephaseless 2024-11-25 09:55:46 +00:00
parent 13d40db8bd
commit a35167e533
3 changed files with 20 additions and 2 deletions

View File

@ -55,7 +55,7 @@ jobs:
rm ./google-chrome-stable_current_amd64.deb
- name: Run tests
run: poetry run pytest
run: poetry run pytest --retries 3 --retry-delay 5
build:
needs: test

19
poetry.lock generated
View File

@ -1339,6 +1339,23 @@ files = [
packaging = ">=17.1"
pytest = ">=7.2"
[[package]]
name = "pytest-retry"
version = "1.6.3"
description = "Adds the ability to retry flaky tests in CI environments"
optional = false
python-versions = ">=3.9"
files = [
{file = "pytest_retry-1.6.3-py3-none-any.whl", hash = "sha256:e96f7df77ee70b0838d1085f9c3b8b5b7d74bf8947a0baf32e2b8c71b27683c8"},
{file = "pytest_retry-1.6.3.tar.gz", hash = "sha256:36ccfa11c8c8f9ddad5e20375182146d040c20c4a791745139c5a99ddf1b557d"},
]
[package.dependencies]
pytest = ">=7.0.0"
[package.extras]
dev = ["black", "flake8", "isort", "mypy"]
[[package]]
name = "pytest-xdist"
version = "3.6.1"
@ -2165,4 +2182,4 @@ h11 = ">=0.9.0,<1"
[metadata]
lock-version = "2.0"
python-versions = "^3.12"
content-hash = "1dcc6c3a9ff83a4e27c96b1047a388e1ddd9a7c326b20ef07793c0721f9594dc"
content-hash = "15aa6bc34351d1ba1a293b12f8979d58d1d1b6d2716eec78b3de581dd59f53d4"

View File

@ -17,6 +17,7 @@ ruff = "^0.8.0"
seleniumbase = "^4.32.12"
pyautogui = "^0.9.54"
beautifulsoup4 = "^4.12.3"
pytest-retry = "^1.6.3"
[build-system]