Skip to content

Implement functions for mocking all the grouper results of OOTB tests class with the JSON file for each active profile #1012

Implement functions for mocking all the grouper results of OOTB tests class with the JSON file for each active profile

Implement functions for mocking all the grouper results of OOTB tests class with the JSON file for each active profile #1012

Workflow file for this run

name: Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout badges branch dedicated to storing badges only
uses: actions/checkout@v2
with:
ref: badges
path: badges
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build with Maven
run: mvn -B -q test -D'logging.level.edu.hawaii.its.api=OFF' -D'logging.level.org.springframework=ERROR' -D'spring.main.banner-mode=off' jacoco:report
- name: Generate Jacoco Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
badges-directory: badges
generate-branches-badge: false
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
- name: Commit and push
if: ${{ github.event_name != 'pull_request' }}
run: |
cd badges
if [[ `git status --porcelain *.svg` ]]; then
git config --global user.name 'Groupings Project'
git config --global user.email '[email protected]'
git add *.svg
git commit -m "Autogenerated JaCoCo coverage badge" *.svg
git push
fi
- name: Upload Jacoco coverage report
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: target/site/jacoco/