server: tests: print server logs only on github action
This commit is contained in:
parent
1c1fd40576
commit
2109743fe3
1 changed files with 6 additions and 5 deletions
|
@ -17,6 +17,7 @@ def before_scenario(context, scenario):
|
||||||
|
|
||||||
def after_scenario(context, scenario):
|
def after_scenario(context, scenario):
|
||||||
if scenario.status == "failed":
|
if scenario.status == "failed":
|
||||||
|
if 'GITHUB_ACTIONS' in os.environ:
|
||||||
print(f"\x1b[33;101mSCENARIO FAILED: {scenario.name} server logs:\x1b[0m\n\n")
|
print(f"\x1b[33;101mSCENARIO FAILED: {scenario.name} server logs:\x1b[0m\n\n")
|
||||||
if os.path.isfile('llama.log'):
|
if os.path.isfile('llama.log'):
|
||||||
with closing(open('llama.log', 'r')) as f:
|
with closing(open('llama.log', 'r')) as f:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue