Skip to content
Snippets Groups Projects
Commit 03384de7 authored by Mohammad Torkashvand's avatar Mohammad Torkashvand
Browse files

fix Skipping coverage report for jenkins

parent 5a97c665
No related branches found
No related tags found
No related merge requests found
Pipeline #89826 failed
...@@ -49,12 +49,6 @@ from test.fixtures import ( # noqa: F401 ...@@ -49,12 +49,6 @@ from test.fixtures import ( # noqa: F401
logging.getLogger("faker.factory").setLevel(logging.WARNING) logging.getLogger("faker.factory").setLevel(logging.WARNING)
def pytest_collection_modifyitems(config, items):
if bool(os.environ.get("SKIP_ALL_TESTS")):
for item in items:
item.add_marker(pytest.mark.skip(reason="Skipped due to SKIP_ALL_TESTS env variable"))
class UseJuniperSide(strEnum): class UseJuniperSide(strEnum):
"""Define on tests on which side to use Juniper router.""" """Define on tests on which side to use Juniper router."""
......
...@@ -20,7 +20,7 @@ commands = ...@@ -20,7 +20,7 @@ commands =
ruff check --respect-gitignore --preview . ruff check --respect-gitignore --preview .
ruff format --respect-gitignore --preview --check . ruff format --respect-gitignore --preview --check .
mypy . mypy .
sh -c 'SKIP_ALL_TESTS=${SKIP_ALL_TESTS:-0}; if [ "$SKIP_ALL_TESTS" = "1" ]; then echo "Skipping coverage report"; else pytest --cov=gso --cov-report=xml --cov-report=html --cov-fail-under=85 -n auto; fi' sh -c 'if [ $SKIP_ALL_TESTS = 1 ]; then echo "Skipping coverage report"; else pytest --cov=gso --cov-report=xml --cov-report=html --cov-fail-under=85 -n auto {posargs}; fi'
allowlist_externals = allowlist_externals =
sh sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment