Skip to content

Commit 1310b91

Browse files
committed
Fixing Test Coverage
1 parent 959c0fa commit 1310b91

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/maven.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,19 @@ jobs:
2424
uses: actions/upload-artifact@v4
2525
with:
2626
name: coverage-report
27-
path: target/site/jacoco/
27+
path: target/site/jacoco/
28+
- name: Generate JaCoCo Badge
29+
uses: cicirello/jacoco-badge-generator@v2
30+
with:
31+
jacoco-csv-file: target/site/jacoco/jacoco.csv
32+
generate-branches-badge: true
33+
badges-directory: badges
34+
fail-on-coverage-decrease: true
35+
minimum-coverage: 80
36+
- name: Commit Badges
37+
run: |
38+
git config --local user.email "[email protected]"
39+
git config --local user.name "GitHub Action"
40+
git add badges/
41+
git commit -m "Update coverage badges" || exit 0
42+
git push

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[![JaCoCo 0.8.x](https://img.shields.io/badge/JaCoCo-Coverage-blue.svg)](https://www.jacoco.org/jacoco/)
77

88
[![Build Status](https://github.com/luismr/dictionary-search-anagrams-java/actions/workflows/maven.yml/badge.svg)](https://github.com/luismr/dictionary-search-anagrams-java/actions/workflows/maven.yml)
9-
[![Coverage](https://img.shields.io/badge/coverage-80%25-brightgreen)](https://github.com/luismr/dictionary-search-anagrams-java/actions/workflows/maven.yml)
9+
[![Coverage](https://github.com/luismr/dictionary-search-anagrams-java/blob/main/badges/jacoco.svg)](https://github.com/luismr/dictionary-search-anagrams-java/actions/workflows/maven.yml)
10+
[![Branches](https://github.com/luismr/dictionary-search-anagrams-java/blob/main/badges/branches.svg)](https://github.com/luismr/dictionary-search-anagrams-java/actions/workflows/maven.yml)
1011

1112
A Java library for searching anagrams in a dictionary with different implementations.
1213

0 commit comments

Comments
 (0)