Skip to content

Refactor code coverage reporting in build.yml #613

Refactor code coverage reporting in build.yml

Refactor code coverage reporting in build.yml #613

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 19
distribution: 'adopt'
- name: Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B verify -Pcode-coverage --file pom.xml
- name: Code Coverage Report
if: ${{ github.actor != 'dependabot[bot]' }}
uses: qltysh/qlty-action/coverage@v2
with:
oidc: true
files: |
target/site/jacoco/jacoco.xml
target/site/jacoco-it/jacoco.xml
add-prefix: src/main/java/