Skip to content

Add PR quality monitor for tests and coverage #103

Add PR quality monitor for tests and coverage

Add PR quality monitor for tests and coverage #103

Workflow file for this run

name: PR build
on:
workflow_call:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
checks: write
pull-requests: write
statuses: write
steps:
- name: Setup Maven Action
uses: s4u/[email protected]
with:
java-distribution: 'temurin'
java-version: 17
maven-version: 3.9.9
cache-enabled: true
- name: Maven build
run: mvn --batch-mode --update-snapshots verify
- name: Run Quality Monitor
uses: uhafner/quality-monitor@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pr-number: ${{ steps.pr.outputs.number }}
config: > # Only evaluate test and coverage for now
{
"tests": {
"name": "JUnit",
"tools": [
{
"id": "test",
"name": "Tests",
"pattern": "**/target/*-reports/TEST*.xml"
}
]
},
"coverage": [
{
"name": "JaCoCo",
"tools": [
{
"id": "jacoco",
"name": "Line Coverage",
"metric": "line",
"sourcePath": "src/main/java",
"pattern": "**/jacoco.xml"
}
]
}
]
}