Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/sonarcloud-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,22 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
# Build + test + jacoco on JDK 17. Skip Sonar here (it requires Java 21+).
- name: Build and test (JDK 17)
env:
USER_NAME: ${{ secrets.PPE_USER_NAME }}
ACCESS_TOKEN: ${{ secrets.PPE_ACCESS_TOKEN }}
run: mvn -B verify -Dsonar.skip=true

# Switch the JVM to 21 ONLY to run the SonarCloud scanner.
- name: Set up JDK 21 for Sonar
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'zulu'

- name: SonarCloud analysis (JDK 21)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=PhonePe_Solus
run: mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=PhonePe_Solus
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
<executions>
<execution>
<id>sonar-run</id>
<phase>verify</phase>
<phase>none</phase>
<goals>
<goal>sonar</goal>
</goals>
Expand Down
Loading