Skip to content

SonarCloud Scan -- main #47

SonarCloud Scan -- main

SonarCloud Scan -- main #47

name: Code Coverage (Sonar Cloud)
run-name: SonarCloud Scan -- ${{github.event.workflow_run.head_branch}}
on:
workflow_run:
workflows:
- Build Workflow
types:
- completed
jobs:
code-coverage:
name: Code Coverage
runs-on: ubuntu-24.04
steps:
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'zulu'
# settings.xml credentials for Nexus
- name: maven settings
uses: s4u/maven-settings-action@v3.1.0
with:
servers: '[{"id": "nexus-repo", "username": "${{ secrets.NEXUS_USER_DEMO }}", "password": "${{secrets.NEXUS_PASSWORD_DEMO}}" }]'
- name: Maven Build
# if: github.event.repository.name != 'reasoner-test-data' && (inputs.branch_name == 'main' || inputs.branch_name == 'master')
shell: bash
run: |
./mvnw clean install -U \
--batch-mode \
-e \
-Dmaven.build.cache.enabled=false \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
-PcodeQuality
- name: IKMDEV Code Coverage
uses: ikmdev/maven-code-coverage-action@main
with:
repo_name: ${{github.event.workflow_run.head_repository.full_name}}
branch_name: ${{github.event.workflow_run.head_branch}}
sonarcloud_token: ${{ secrets.SONAR_TOKEN }}