Project 4 for Software Quality and Testing course. Use GitHub actions for continuous integration and incorporating status badges to provide code quality metrics such as test coverage.
- Implementation of a stack data structure and related unit test to serve as a sample project.
- Objective of this project is to showcase use of GitHub Actions for continuous integration and generating status badges.
- We are using a combination of unittest, pytest, coverage.py and coveralls to provide a testing framework and coverage report.
- In addition to repository badges, we incorporated a sample pull request badge to provide a visual indicator on the potential complexity of a PR.
Badge |
Description |
|
The code coverage badge is provided by Coveralls. Coverage reports are generated by the coverage.py module during workflow runs and submitted to coveralls. Coveralls then parses the coverage report and tracks changes to test coverage over time. Clicking the badge will take you to a dashboard showing this data. A higher percentage of code coverages indicates that most of the code is executed during testing. A high coverage score is a strong indicator for code quality. |
|
The build status badge comes from the status of our GitHub workflow. It is executed in Ubuntu which is why we gave the badge a Linux designation. |
|
The commit activity badge shows the number of commits to the main branch over a time period. The goal of this badge is to determine how actively maintained the project is. |
Badge |
Description |
|
This badge is provided by CodeFactor, a platform that analyzes code quality. The tool provides automated updates when changes are detected to any branch setup for monitoring. They feedback on code complexity and easy navigation to review recent changes to the code base. Another feature of this provider is integration with slack to provide automated messaging in a slack channel when issues are detected. |
|
The maintainability badge is provided by Code Climate. The connection is is similar to CodeFactor. One valuable feature of this tool is detection of refactoring opportunities to increase code reuse and therefore code quality. This vendor can also provide coverage status badges and could potentially remove coveralls as a dependency. |
|
The code size badge shows the size of the code base in kB. This may provide insight into the complexity of a project. |
Badge |
Description |
|
Screenshot from PR #5 showing a large pull request. Large PRs are defined as having 500 or more additions, medium pull request are defined by having 200 and 500 additions. Configuration stored in .github/pr-badge.yml and provided by pullrequestbadge.com. PR badges could be used to provide visibility to the quality of a pull request based on a number of different characteristics. |