Skip to content

Commit 73cc276

Browse files
authored
Merge pull request #7 from cidrblock/main
Switch to import_role
2 parents 7775c69 + 3bc33c5 commit 73cc276

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/pytest_ansible_network_integration/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -347,15 +347,15 @@ def github_log(request: pytest.FixtureRequest) -> Generator[None, None, None]:
347347
:yields: To the test
348348
"""
349349
if not os.environ.get("GITHUB_ACTIONS"):
350-
return
350+
yield
351+
else:
352+
name = request.node.name
351353

352-
name = request.node.name
354+
_github_action_log(f"::group::Run integration test: '{name}'")
355+
yield
353356

354-
_github_action_log(f"::group::Run integration test: '{name}'")
355-
yield
357+
if hasattr(request.node, "rep_call"):
358+
if request.node.rep_setup.passed and request.node.rep_call.failed:
359+
_github_action_log(f"::error title=Integration test failure::{name}")
356360

357-
if hasattr(request.node, "rep_call"):
358-
if request.node.rep_setup.passed and request.node.rep_call.failed:
359-
_github_action_log(f"::error title=Integration test failure::{name}")
360-
361-
_github_action_log("::endgroup::")
361+
_github_action_log("::endgroup::")

0 commit comments

Comments
 (0)