Merge pull request #1382 from hazendaz/master #626
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: 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@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6 | |
| with: | |
| # Disabling shallow clone is recommended for improving relevancy of reporting | |
| fetch-depth: 0 | |
| - name: Setup Java | |
| uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 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 }} |