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

@ -95,7 +95,7 @@ jobs:
--list-input=input-list-${{ matrix.idx }}.txt \ --list-input=input-list-${{ matrix.idx }}.txt \
--output-file=output-${{ matrix.idx }}.xml \ --output-file=output-${{ matrix.idx }}.xml \
--progress-file=progress-${{ matrix.idx }}.yaml \ --progress-file=progress-${{ matrix.idx }}.yaml \
--log-file=run-${{ matrix.idx }}.log --log-file=run-${{ matrix.idx }}.log > screen.${{ matrix.idx }}
fi fi
tar -cvf quick-regression-test-${{ matrix.idx }}.tar run-${{ matrix.idx }}.log progress-${{ matrix.idx }}.yaml output-${{ matrix.idx }}.xml tar -cvf quick-regression-test-${{ matrix.idx }}.tar run-${{ matrix.idx }}.log progress-${{ matrix.idx }}.yaml output-${{ matrix.idx }}.xml
@ -106,6 +106,12 @@ jobs:
name: quick-regression-test-artifact-${{ matrix.idx }} name: quick-regression-test-artifact-${{ matrix.idx }}
path: quick-regression-test-${{ matrix.idx }}.tar path: quick-regression-test-${{ matrix.idx }}.tar
- name: Upload screen output
uses: actions/upload-artifact@v4
with:
name: screen-output-${{ matrix.idx }}
path: screen.${{ matrix.idx }}
merge: merge:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
@ -115,4 +121,6 @@ jobs:
with: with:
name: merged-quick-regresssion-artifact name: merged-quick-regresssion-artifact
pattern: quick-regression-test-artifact-* pattern: quick-regression-test-artifact-*
- name: Print job summary
run: |
grep Failed screen.* | tr -d '\n' > $GITHUB_STEP_SUMMARY

View File

@ -1521,6 +1521,7 @@ if __name__ == "__main__":
msg += f" - Completed: {completed_tests}\n" msg += f" - Completed: {completed_tests}\n"
# print notice to GitHub # print notice to GitHub
if 'GITHUB_STEP_SUMMARY' in os.environ:
with open(os.environ.get('GITHUB_STEP_SUMMARY'), 'w') as f: with open(os.environ.get('GITHUB_STEP_SUMMARY'), 'w') as f:
print(f"Skipped: {skipped_tests} Failed: {error_tests} Completed: {completed_tests}", file=f) print(f"Skipped: {skipped_tests} Failed: {error_tests} Completed: {completed_tests}", file=f)
@ -1529,7 +1530,7 @@ if __name__ == "__main__":
if passed_tests <= completed_tests: if passed_tests <= completed_tests:
msg += f" - numerical tests passed: {passed_tests}\n" msg += f" - numerical tests passed: {passed_tests}\n"
msg += "\nOutput:\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" - Status of the tested inputs : {progress_file}\n"
msg += f" - Running log with screen output: {log_file}\n" msg += f" - Running log with screen output: {log_file}\n"
msg += f" - Testing result in JUnit XML : {output_file}\n" msg += f" - Testing result in JUnit XML : {output_file}\n"