Github action that publishes the JaCoCo report as a comment in the Pull Request.
The JaCoCo Report GitHub Action is designed to publish the JaCoCo code coverage report as a comment in the Pull Request. It provides a detailed overview of the code coverage, highlighting the percentage of lines, branches, and methods covered by the tests. This action helps developers and reviewers assess the quality of the codebase and identify areas that require additional testing.
TODO
- Description: TODO
- Required: Yes
- Example:
TODO
- Description: Enable verbose logging to provide detailed output during the action’s execution, aiding in troubleshooting and setup.
- Required: No
- Default:
false
- Note: If workflow run in debug mode, 'verbose-logging' is set to 'true.'
- Description: Set to true to fail the action if any convention violations are detected. Set false to continue without failure.
- Required: No
- Default:
false
TODO
TODO
Clone the repository and navigate to the project directory:
git clone https://github.com/AbsaOSS/jacoco-report.git
cd jacoco-report
Install the dependencies:
pip install -r requirements.txt
Unit tests are written using pytest. To run the tests, use the following command:
pytest
This will execute all tests located in the tests directory and generate a code coverage report.
Code coverage is collected using pytest-cov coverage tool. To run the tests and collect coverage information, use the following command:
pytest --cov=jacoco_report --cov-report html tests/
See the coverage report on the path:
htmlcov/index.html
Create *.sh file and place it in the project root.
#!/bin/bash
# Set environment variables based on the action inputs
export INPUT_TODO="TODO"
# Run the Python script
python3 ./jacoco_report/todo.py
Feel free to submit issues or pull requests. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.