KanoComputing / kano-profile

Tool to communicate with Kano-World
GNU General Public License v2.0
6 stars 6 forks source link

[RFC] Run tests on push and add coverage metrics #443

Closed tombettany closed 6 years ago

tombettany commented 6 years ago

Runs tests in a Python docker container (the standard python:2.7-jessie container from Docker Hub) on the dev server. To do this, I've added requirements.txt and requirements-dev.txt files to keep Python dependencies and added a rudimentary system for installing the repository dependencies. Clearly we can factor out the steps from the Jenkinsfile to the Jenkins library once we know how we want everything to work. After the tests run, the test results are reported to Jenkins. Currently these don't cause the build to fail but this functionality can be added. Any thoughts on whether we want to fail the build in this case?

Tests which require Gtk have been marked as such and won't be run on the server until we can figure out how to do this. On this note, I have migrated all non-standard imports to within the tests themselves so that if an import fails the whole test suite doesn't fall over. Do people think that this is a good practice moving forward to make all tests self-contained?

Also adds a detailed coverage report to each build

screen shot 2017-12-04 at 11 39 31

Suggestions, comments and improvements are more than welcome.

tombettany commented 6 years ago

Same as https://github.com/KanoComputing/kano-toolset/pull/273 so merging as that was approved :)