Workflow file for this run
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
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 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: adopt | |
java-version: 11 | |
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/[email protected] | |
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 |