Skip to content

Add notification feature#62

Open
vinw12 wants to merge 1 commit intoFullStackWithLawrence:mainfrom
vinw12:main
Open

Add notification feature#62
vinw12 wants to merge 1 commit intoFullStackWithLawrence:mainfrom
vinw12:main

Conversation

@vinw12
Copy link
Copy Markdown

@vinw12 vinw12 commented May 1, 2026

This pull request updates the test notification step in the .github/workflows/testsPython.yml workflow 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:

  • Enhanced the test result notification step to use GitHub Actions' ::notice and ::error annotations, and to write detailed messages to the $GITHUB_STEP_SUMMARY for both success and failure cases. This provides clearer and more visible feedback directly in the GitHub Actions UI.
  • Ensured that the notification step always runs, regardless of the outcome of previous steps, by adding if: always().# Pull Request Template

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings May 1, 2026 23:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 notifications job unconditionally via if: always().
  • Emit ::notice / ::error annotations 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants