Update GitHub Action Versions #191
This file contains hidden or 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@v6.0.2 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5.2.0 | |
| 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.7.2 | |
| 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 |