This is a simple GitHub repository that shows how you can use GitHub Actions to run unittests on Python code.
The workflow file is found here at .github/workflows/py-unittest.yml, and it simply runs the command:
python -m unittest *.py
To see the failing test results, visit the results of this job.
You'll notice that the test failed and the reason given is:
AssertionError: 4 != 5
You can easily fix the failing test with this Pull Request- "Fix Failing Unittest"
And sure enough, the tests pass and the GitHub Actions workflow shows green 🟢:
As well as when looking at the Pull Request itself: