Add notification feature#62
Open
vinw12 wants to merge 1 commit intoFullStackWithLawrence:mainfrom
Open
Conversation
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
Pull request overview
This PR improves the post-test notifications in the Python CI workflow by ensuring the notification job always runs and by adding GitHub Actions annotations plus a step summary for clearer visibility of test outcomes.
Changes:
- Run the
notificationsjob unconditionally viaif: always(). - Emit
::notice/::errorannotations for success/failure. - Write a short success/failure report into
$GITHUB_STEP_SUMMARY.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+78
to
+83
| echo "## ✅ Test Success" >> $GITHUB_STEP_SUMMARY | ||
| echo "All tests passed successfully" >> $GITHUB_STEP_SUMMARY | ||
| else | ||
| echo "failure notifications go here" | ||
| echo "::error title=Tests Failed::Some Python tests failed. ❌" | ||
| echo "## ❌ Test Failure" >> $GITHUB_STEP_SUMMARY | ||
| echo "Some tests failed." >> $GITHUB_STEP_SUMMARY |
Comment on lines
76
to
+83
| if [ "${{ needs.python-unit-tests.result }}" == "success" ]; then | ||
| echo "success notifications go here" | ||
| echo "::notice title=Tests Passed::All Python tests passed successfully! ✅" | ||
| echo "## ✅ Test Success" >> $GITHUB_STEP_SUMMARY | ||
| echo "All tests passed successfully" >> $GITHUB_STEP_SUMMARY | ||
| else | ||
| echo "failure notifications go here" | ||
| echo "::error title=Tests Failed::Some Python tests failed. ❌" | ||
| echo "## ❌ Test Failure" >> $GITHUB_STEP_SUMMARY | ||
| echo "Some tests failed." >> $GITHUB_STEP_SUMMARY |
| notifications: | ||
| needs: python-unit-tests | ||
| runs-on: ubuntu-latest | ||
| if: always() # Add this line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the test notification step in the
.github/workflows/testsPython.ymlworkflow to provide clearer and more informative feedback on test results. The main improvement is enhanced notification messages for both test success and failure, which now use GitHub Actions' annotation and summary features.Test Notification Improvements:
::noticeand::errorannotations, and to write detailed messages to the$GITHUB_STEP_SUMMARYfor both success and failure cases. This provides clearer and more visible feedback directly in the GitHub Actions UI.if: always().# Pull Request Template