Skip to content

Commit

Permalink
Merge pull request #39 from ClementGib/task#64
Browse files Browse the repository at this point in the history
task#64: add code coverage with jacoco in action pipeline
  • Loading branch information
ClementGib committed Oct 27, 2024
2 parents 67affa5 + 0beb96d commit 6feab09
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
Expand All @@ -27,8 +27,10 @@ jobs:
distribution: 'temurin'
architecture: x64
cache: maven

- name: Build with Maven and tests
run: mvn -B package --file pom.xml

- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
Expand All @@ -41,14 +43,16 @@ jobs:
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
echo "GitHub User ID: ${GITHUB_ACTOR}"
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Commit the badge (if it changed)
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name 'YOUR NAME HERE'
git config --global user.email 'YOUR-GITHUB-USERID@users.noreply.github.com'
git config --global user.name '${GITHUB_ACTOR}'
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git add -A
git commit -m "Autogenerated JaCoCo coverage badge"
git push
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@

# Bank Account Quarkus 🏦 ![image](https://github.com/ClementGib/BankAccountQuarkus/assets/50382080/43b59c95-1778-4d52-bb65-7697e20c8298)
# Bank Account Quarkus ![image](https://github.com/ClementGib/BankAccountQuarkus/assets/50382080/43b59c95-1778-4d52-bb65-7697e20c8298)

<!-- README.md -->
+ [![cov](https://ClementGib.github.io/BankAccountQuarkus/badges/coverage.svg)](https://github.com/ClementGib/BankAccountQuarkus/actions)

## About
| **Project info** | ![java](https://img.shields.io/badge/Java-100%25-red) ![Static Badge](https://img.shields.io/badge/Framework-Quarkus-blue) [![License](https://img.shields.io/badge/License-MIT-green)](https://github.com/ClementGib/BankAccountQuarkus/blob/develop/LICENSE)|
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Build Status** | [![build](https://github.com/ClementGib/BankAccountQuarkus/jacoco-badge-generator/actions/workflows/workflow.yml/badge.svg)](https://github.com/ClementGib/BankAccountQuarkus/jacoco-badge-generator/actions/workflows/workflow.yml) |

# Sommaire
1. [Directives](#Directives-)
2. [Solution](#Solution-)
![Uploading image.png…]()



## Directives 🥅
Expand Down

0 comments on commit 6feab09

Please sign in to comment.