From bf15f1ae950154bd0d94c5a79f97f1ac9a1402a1 Mon Sep 17 00:00:00 2001 From: Artem Rys Date: Thu, 26 Oct 2023 17:09:18 +0200 Subject: [PATCH] ci: install pytest-rerunfailures and use correct matrix variable --- .github/workflows/build-test-release.yaml | 3 ++- poetry.lock | 18 +++++++++++++++++- pyproject.toml | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-release.yaml b/.github/workflows/build-test-release.yaml index ce2aecf5..c5fdc2a8 100644 --- a/.github/workflows/build-test-release.yaml +++ b/.github/workflows/build-test-release.yaml @@ -111,6 +111,7 @@ jobs: path: output/* run-ui-tests: + name: test-ui Splunk ${{ matrix.splunk.version }} -k ${{ matrix.test_suite }} needs: - meta - build @@ -158,7 +159,7 @@ jobs: - run: | ./run_splunk.sh ${{ matrix.splunk.version }} until curl -Lsk "https://localhost:8088/services/collector/health" &>/dev/null ; do echo -n "Waiting for HEC-" && sleep 5 ; done - - run: poetry run pytest tests/ui -k "${{ matrix.test-suite }}" --headless --junitxml=test-results/junit.xml + - run: poetry run pytest tests/ui -k "${{ matrix.test_suite }}" --headless --junitxml=test-results/junit.xml - uses: actions/upload-artifact@v3 if: always() with: diff --git a/poetry.lock b/poetry.lock index c35dc3c6..25574ef0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -939,6 +939,22 @@ files = [ [package.dependencies] pytest = "*" +[[package]] +name = "pytest-rerunfailures" +version = "12.0" +description = "pytest plugin to re-run tests to eliminate flaky failures" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pytest-rerunfailures-12.0.tar.gz", hash = "sha256:784f462fa87fe9bdf781d0027d856b47a4bfe6c12af108f6bd887057a917b48e"}, + {file = "pytest_rerunfailures-12.0-py3-none-any.whl", hash = "sha256:9a1afd04e21b8177faf08a9bbbf44de7a0fe3fc29f8ddbe83b9684bd5f8f92a9"}, +] + +[package.dependencies] +importlib-metadata = {version = ">=1", markers = "python_version < \"3.8\""} +packaging = ">=17.1" +pytest = ">=6.2" + [[package]] name = "pytest-splunk-addon" version = "5.1.0" @@ -1537,4 +1553,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.7" -content-hash = "8e402ccc26b507eb4147af5ba6a22450a9a0e709d681ab3618ab74b35d7d4256" +content-hash = "3add4fe46e9d99c0dc41230a04c21bca44eb07a7178fe923c70d284cf767e597" diff --git a/pyproject.toml b/pyproject.toml index 60ae0fde..d1075d8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,7 @@ Sphinx = "*" sphinx_rtd_theme = "*" sphinx-panels = "*" splunk-add-on-ucc-framework = "^5.28.5" +pytest-rerunfailures = "^12.0" [build-system] requires = ["poetry_core>=1.0.0"]