Repository navigation
Bump the maven-plugins group across 2 directories with 2 updates #248
Workflow file for this run
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
| # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | |
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: Java CI with Maven | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for better SonarCloud analysis | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'zulu' | |
| cache: maven | |
| - name: Cache SonarCloud packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.sonar/cache | |
| key: ${{ runner.os }}-sonar | |
| restore-keys: ${{ runner.os }}-sonar | |
| - name: Cache Maven packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: Build with Maven | |
| run: mvn -B install -Pmetrics --file pom.xml | |
| - name: SonarCloud Analysis | |
| # Skip for Dependabot PRs (no access to secrets) | |
| if: github.actor != 'dependabot[bot]' | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| run: mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --file pom.xml | |
| - name: Upload JaCoCo HTML report (processor) | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jacoco-report-html-processor | |
| path: processor/target/site/jacoco/ | |
| if-no-files-found: warn | |
| - name: Upload JaCoCo XML report (processor) | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jacoco-report-xml-processor | |
| path: processor/target/site/jacoco/jacoco.xml | |
| if-no-files-found: warn | |
| - name: Upload test results to Codecov (processor) | |
| # Skip for Dependabot PRs (no access to secrets) | |
| if: always() && github.actor != 'dependabot[bot]' | |
| uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: | | |
| processor/target/surefire-reports/*.xml | |
| processor/target/failsafe-reports/*.xml | |
| fail_ci_if_error: true | |
| verbose: false | |
| - name: Upload coverage to Codecov (processor) | |
| # Skip for Dependabot PRs (no access to secrets) | |
| if: always() && github.actor != 'dependabot[bot]' | |
| uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7 | |
| with: | |
| fail_ci_if_error: true | |
| files: processor/target/site/jacoco/jacoco.xml | |
| flags: processor | |
| name: codecov-upload | |
| verbose: false | |
| token: ${{ secrets.CODECOV_TOKEN }} |