diff --git a/.github/actions/process-coverage-report/action.yml b/.github/actions/process-coverage-report/action.yml index 174d9f91e..94d301463 100644 --- a/.github/actions/process-coverage-report/action.yml +++ b/.github/actions/process-coverage-report/action.yml @@ -1,9 +1,6 @@ name: 'Process Coverage Report' description: 'Process the generated coverage for further reporting, uses JaCoCo-report plugin' inputs: - sonar_token: - description: 'SonarCloud token to upload the coverage report' - required: true paths: description: 'Comma separated paths of the generated JaCoCo xml files (supports wildcard glob pattern)' required: true diff --git a/.github/actions/sonar-scanner/action.yml b/.github/actions/sonar-scanner/action.yml index 62f7ecc17..7d2ffc992 100644 --- a/.github/actions/sonar-scanner/action.yml +++ b/.github/actions/sonar-scanner/action.yml @@ -1,58 +1,16 @@ -name: 'Process Coverage Report' -description: 'Process the generated coverage for further reporting, uses JaCoCo-report plugin' +name: 'Sonar Scanner' +description: 'Run Sonar Scanner to load JaCoCo report on SonarCloud' inputs: sonar_token: - description: 'SonarCloud token to upload the coverage report' + description: 'SonarCloud token' required: true - paths: - description: 'Comma separated paths of the generated JaCoCo xml files (supports wildcard glob pattern)' + aggregate-report-path: + description: 'Path of the aggregated JaCoCo report' required: true - token: - description: 'Github personal token to add commits to Pull Request' + project_key: + description: 'SonarCloud project key' required: true - min-coverage-overall: - description: 'The minimum code coverage that is required to pass for overall project' - required: false - default: '80' - min-coverage-changed-files: - description: 'The minimum code coverage that is required to pass for changed files' - required: false - default: '80' - title: - description: 'Optional title for the Pull Request comment' - required: false - update-comment: - description: 'Update the coverage report comment instead of creating new ones. Requires title to works properly.' - required: false - default: 'false' - skip-if-no-changes: - description: "Comment won't be added if there is no coverage information present for the files changed" - required: false - default: 'false' - pass-emoji: - description: 'Github emoji to use for pass status shown when coverage greater than min coverage (should be a Github supported emoji)' - required: false - default: ':green_apple:' - fail-emoji: - description: 'Github emoji to use for fail status shown when coverage lesser than min coverage (should be a Github supported emoji)' - required: false - default: ':x:' - continue-on-error: - description: 'When there is an error do not fail the action, but log a warning' - required: false - default: 'true' - debug-mode: - description: 'Run the action in debug mode and get debug logs printed in console' - required: false - default: 'false' -outputs: - coverage-overall: - description: 'The overall coverage of the project' - value: ${{ steps.jacoco-aggregate.outputs.coverage-overall }} - coverage-changed-files: - description: 'The total coverage of all changed files' - value: ${{ steps.jacoco-aggregate.outputs.coverage-changed-files }} runs: using: composite @@ -62,28 +20,4 @@ runs: SONAR_TOKEN: ${{ inputs.sonar_token }} shell: bash run: | - mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=alfresco -Dsonar.projectKey=Alfresco_hxp-studio-services -Dsonar.coverage.jacoco.xmlReportPaths=${{ inputs.paths }} - -# - name: SonarCloud Scan -# uses: sonarsource/sonarcloud-github-action@v3.1.0 -# env: -# SONAR_TOKEN: ${{ inputs.sonar_token }} -# with: -# args: > -# -Dsonar.coverage.jacoco.xmlReportPaths=${{ inputs.paths }} -# - uses: madrapps/jacoco-report@7c362aca34caf958e7b1c03464bd8781db9f8da7 # v1.7.1 -# id: jacoco-aggregate -# with: -# paths: ${{ inputs.paths }} -# token: ${{ inputs.token }} -# min-coverage-overall: ${{ inputs.min-coverage-overall }} -# min-coverage-changed-files: ${{ inputs.min-coverage-changed-files }} -# title: ${{ inputs.title }} -# update-comment: ${{ inputs.update-comment }} -# skip-if-no-changes: ${{ inputs.skip-if-no-changes }} -# pass-emoji: ${{ inputs.pass-emoji }} -# fail-emoji: ${{ inputs.fail-emoji }} -# continue-on-error: ${{ inputs.continue-on-error }} -# debug-mode: ${{ inputs.debug-mode }} -# coverage-overall: ${{ inputs.coverage-overall }} -# coverage-changed-files: ${{ inputs.coverage-changed-files }} + mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=alfresco -Dsonar.projectKey=${{ inputs.project_key}} -Dsonar.coverage.jacoco.xmlReportPaths=${{ inputs.aggregate-report-path }} diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fbf9b433f..ef01fb8b7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -577,6 +577,14 @@ updates: catch-all: patterns: - "*" + - package-ecosystem: "github-actions" + directory: "/.github/actions/sonar-scanner" + schedule: + interval: "weekly" + groups: + catch-all: + patterns: + - "*" - package-ecosystem: "github-actions" directory: "/.github/actions/update-deployment-runtime-versions" schedule: