This is my first post on DEV, so I'm going to try to make this quick and simple.
If you want inline examples of exactly where your code is failing, you can integrate Cirrus CI with GitHub annotations. This is super simple to do.
- Start off by writing unittests. This is super simple.
- Setup a basic CI pipeline (
.cirrus.ymlfile). You will want to do something like this:
tests_task: # define Docker container container: image: python:latest # install project requirements and the annotation result builder install_script: | pip install -r ./some-requirements-file.txt pip install unittest-xml-reporting # normally, you would run unittests with the main command # we need to build XML reports, so use this command script: python3 -m xmlrunner tests # replace tests with the name of the module your unittests are in # (always) upload results - even if the tests fail always: unittest_results_artifacts: # where the outputted XML files are path: ./*.xml # required, even though it sounds wrong format: junit
And that is all you need to do!
You should then get annotations.
Have a nice day!