Skip to content

Github action that publishes the JaCoCo report as a comment in the Pull Request.

License

Notifications You must be signed in to change notification settings

AbsaOSS/jacoco-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JaCoCo Report

Github action that publishes the JaCoCo report as a comment in the Pull Request.

Description

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.

How It Works

TODO

Inputs

TODO

  • Description: TODO
  • Required: Yes
  • Example: TODO

verbose-logging

  • 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.'

fail-on-violation

  • Description: Set to true to fail the action if any convention violations are detected. Set false to continue without failure.
  • Required: No
  • Default: false

Usage Example

Default

TODO

Full example

TODO

How to build

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

Running Unit Tests

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

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

Run Action Locally

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

Contributing

Feel free to submit issues or pull requests. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

About

Github action that publishes the JaCoCo report as a comment in the Pull Request.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published