Skip to content

Commit

Permalink
Update SonarCloud configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sunye committed Sep 30, 2024
1 parent 3309adc commit 7078b48
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,32 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 22
uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'temurin'
cache: maven
distribution: 'zulu'
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Analyze with SonarCloud
run: ./mvnw -B jacoco:prepare-agent package jacoco:report jacoco:report-aggregate sonar:sonar -Dsonar.projectKey=org.atlanmod.neoemf:neoemf -Dsonar.organization=atlanmod -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dsonar.coverage.jacoco.xmlReportPaths=./target/site/jacoco-aggregate/jacoco.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Build and install main project
run: ./mvnw clean install -DskipTests
- name: Build benchmarks
run: ./mvnw clean package -f benchmarks/pom.xml
- name: Build and analyze
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=atlanmod_NeoEMF


build-plugins:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
'void com.google.common.util.concurrent.Futures.addCallback(ListenableFuture, FutureCallback)'
needed by Hadoop's hdfs-server
-->
<guava.version>23.6-jre</guava.version>
<guava.version>33.3.1-jre</guava.version>
<jdk.module.illegalAccess>deny</jdk.module.illegalAccess>
<junit.version>5.7.1</junit.version>
<sonar.organization>atlanmod</sonar.organization>
Expand Down

0 comments on commit 7078b48

Please sign in to comment.