Skip to content

Merge pull request #1400 from mybatis/renovate/org.apache.maven-maven… #643

Merge pull request #1400 from mybatis/renovate/org.apache.maven-maven…

Merge pull request #1400 from mybatis/renovate/org.apache.maven-maven… #643

Workflow file for this run

name: SonarCloud
defaults:
run:
working-directory: core/mybatis-generator-core
on:
push:
branches:
- master
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
SONAR_ORGANIZATION: mybatis
SONAR_PROJECT_KEY: generator
jobs:
build:
if: github.repository_owner == 'mybatis'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5
with:
cache: maven
distribution: temurin
java-version: 25
- name: Set SONAR_SCANNER_JAVA_OPTS
run: echo "SONAR_SCANNER_JAVA_OPTS=-Xmx512m" >> ${GITHUB_ENV}
- name: Analyze with SonarCloud
# Note: the mvnw executable is in the parent directory - not this working directory. We only do sonar on the
# core project, not all the test projects.
run: ../mvnw verify jacoco:report sonar:sonar --batch-mode --no-transfer-progress --show-version -Dlicense.skip=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=${{ env.SONAR_ORGANIZATION }} -Dsonar.projectKey=${{ env.SONAR_ORGANIZATION }}_${{ env.SONAR_PROJECT_KEY }} -Dsonar.scanner.skipJreProvisioning=true -Dsonar.token=${{ env.SONAR_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}