Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/esafirm/jacoco-essence
Tool to extract Jacoco data for CI usage or anything else
https://github.com/esafirm/jacoco-essence
ci cicd coverage coverage-repo danger jacoco
Last synced: about 2 months ago
JSON representation
Tool to extract Jacoco data for CI usage or anything else
- Host: GitHub
- URL: https://github.com/esafirm/jacoco-essence
- Owner: esafirm
- License: mit
- Created: 2019-10-12T09:20:22.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T22:31:10.000Z (about 2 years ago)
- Last Synced: 2023-08-06T04:42:02.958Z (over 1 year ago)
- Topics: ci, cicd, coverage, coverage-repo, danger, jacoco
- Language: Kotlin
- Homepage:
- Size: 230 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jacoco Essence
A tool to extract Jacoco result such as total project coverage or class by class coverage for CI/CD usages or anything you want.
## Build & Test
To build the jar simply run
```bash
./gradlew fatJar
```The jar will be located on `build/libs` directory.
To run the test use
```bash
./gradlew test
```## Usage
You must specify where the `jacoco.xml` path in `--input`
Example:
```bash
java -jar ./jacoco-essence-1.0-SNAPSHOT.jar --input=src/test/resources/jacoco.xml
```### Specify files to check
By default `jacoco-essence` will running git diff to `master` branch.
To change the destination you can specify the branch with `--dest````bash
java -jar ./jacoco-essence-1.0-SNAPSHOT.jar --input=src/test/resources/jacoco.xml --dest=develop --min=75
````jacoco-essence` also can take the affected files list with `git diff --name-only` format, like this
```bash
src/main/ClassToTest.kt
src/main/SomeProcessor.kt
```You can specify the diff data by passing `--diff` parameter. This is also helpful if your CI environment already have the data
```bash
java -jar ./jacoco-essence-1.0-SNAPSHOT.jar --input=src/test/resources/jacoco.xml --diff=$GIT_FILES
```## License
MIT @ Esa Firman