try again with the github step summary

This commit is contained in:
Trung Nguyen
2024-09-30 15:15:30 -05:00
parent b25e370e63
commit 97920f9fc3
2 changed files with 14 additions and 5 deletions

View File

@ -1521,15 +1521,16 @@ if __name__ == "__main__":
msg += f" - Completed: {completed_tests}\n"
# print notice to GitHub
with open(os.environ.get('GITHUB_STEP_SUMMARY'), 'w') as f:
print(f"Skipped: {skipped_tests} Failed: {error_tests} Completed: {completed_tests}", file=f)
if 'GITHUB_STEP_SUMMARY' in os.environ:
with open(os.environ.get('GITHUB_STEP_SUMMARY'), 'w') as f:
print(f"Skipped: {skipped_tests} Failed: {error_tests} Completed: {completed_tests}", file=f)
if memleak_tests < completed_tests and 'valgrind' in config['mpiexec']:
msg += f" - memory leak detected : {memleak_tests}\n"
if passed_tests <= completed_tests:
msg += f" - numerical tests passed: {passed_tests}\n"
msg += "\nOutput:\n"
msg += f" - Failed inputs and reasons : {failure_file}\n"
msg += f" - List of failed inputs : {failure_file}\n"
msg += f" - Status of the tested inputs : {progress_file}\n"
msg += f" - Running log with screen output: {log_file}\n"
msg += f" - Testing result in JUnit XML : {output_file}\n"