-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | ||
|
||
name: Java CI with Gradle | ||
name: Medicines Backend Build | ||
|
||
on: | ||
push: | ||
|
@@ -18,10 +18,12 @@ jobs: | |
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
|
@@ -41,4 +43,21 @@ jobs: | |
working-directory: ./medicines | ||
run: ./gradlew build -x test | ||
|
||
- name: Generate Jacoco Badge | ||
id: jacoco | ||
uses: cicirello/jacoco-badge-generator@v2 | ||
with: | ||
generate-branches-badge: true | ||
jacoco-csv-file: medicines/build/reports/jacoco/test/jacocoTestReport.csv | ||
|
||
- name: Commit the badge (if it changed) | ||
working-directory: ./medicines | ||
run: | | ||
if [[ `git status --porcelain` ]]; then | ||
git config --global user.name 'Nuno Rolo' | ||
git config --global user.email '[email protected]' | ||
git add -A | ||
git commit -m "Autogenerated JaCoCo coverage badge" | ||
git push | ||
fi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters