Skip to content

Commit

Permalink
Add jacoco badge (#2)
Browse files Browse the repository at this point in the history
* Add jacoco badge

* Don't test twice

* Improved tests and made redis listener daemon

* Fixed readme

* Update readme

* Fixed tests

* Disabled broken test

* Disabled broken tests

* Change commits

* How difficult could this be

* Last attempt or ill close and forget about this

* Fr? just like that?

* Add JaCoCo badge

* Add to readme

---------

Co-authored-by: Duckelekuuk <[email protected]>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 1, 2023
1 parent 1dfb6a5 commit 5a88d88
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/badges/branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/badges/jacoco.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 18 additions & 11 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,34 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up JDK 20
uses: actions/setup-java@v3
with:
java-version: '17.0.8+7'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

# run tests with junit
- name: Test with JUnit
run: mvn -B test --file pom.xml

- name: Add coverage to PR
- name: Generate JaCoCo Badge
id: jacoco
uses: madrapps/[email protected]
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
jacoco-csv-file: >
meteor-jedis/target/site/jacoco/jacoco.csv
meteor-core/target/site/jacoco/jacoco.csv
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
paths: |
${{ github.workspace }}/**/target/site/jacoco/jacoco.xml,
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60
title: Code Coverage
update-comment: true
default_author: github_actions
message: "Add JaCoCo badge"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img height="150" src="https://github.com/pixelib/Meteor/assets/10709682/d2a36e0a-38d5-43b7-a33b-600834559e46" />
</p>

# Meteor
# Meteor ![branches](.github/badges/branches.svg) ![jacoco coverage](.github/badges/jacoco.svg)
> A general-purpose Java RPC library that plugs in like magic
Meteor is designed to fill the (physical) gap between application instances and remote services where applications need to interface with a service that may be available locally or be provided by a remote JVM instance.
Expand Down

0 comments on commit 5a88d88

Please sign in to comment.