Skip to content

feat(Init): Init Branch + toolchain plugin java version 17 #169

feat(Init): Init Branch + toolchain plugin java version 17

feat(Init): Init Branch + toolchain plugin java version 17 #169

name: On pull request push, perform a build with test reports shown and coverage evaluated (and compared with main)
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
cache: 'maven'
- name: Build with Maven
run: mvn -B test --file pom.xml -Pcoverage -Daadarchi.github.token="$TOKEN_FOR_GITHUB" -Daadarchi.gitlab.token="$TOKEN_FOR_GITLAB"
env:
TOKEN_FOR_GITHUB: ${{ secrets.TOKEN_FOR_GITHUB }}
TOKEN_FOR_GITLAB: ${{ secrets.TOKEN_FOR_GITLAB }}
# Seen on https://stackoverflow.com/a/70405596/15619
- name: Add coverage to PR
id: jacoco
uses: madrapps/jacoco-report@v1.6.1
with:
paths: "**/target/site/jacoco/jacoco.xml"
token: "${{ secrets.GITHUB_TOKEN }}"
min-coverage-overall: 10
min-coverage-changed-files: 50
title: Current coverage (as computed by Jacoco)
update-comment: true