Currently, we do a lot of things when there is a application build job triggered (the trigger can be manual, or there is a commit to the develop/trunk branch, or there is a Pull Request created or updated).
The build itself is a multi-step process which aside from other things does, as a build verification process, the whole test run, static code analysis check and a coverage report analysis. A build would be marked as failed if:
- any of the tests failed ("fail first" mode)
- there is a static code analysis error or warning
- coverage dropped lower than N% (in our case it's 90%)
Do you see any problems in this approach? Is it too strict and can be improved?
For instance, recently we've got a failed build just because someone did not put a space after a
# comment character in a Python module (which is a
PEP8 Python code style violation):
#some_code = "here" ^ no space here - PEP8 code style violation