Skip to content

Commit

Permalink
Rename analyze github action to sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Dec 6, 2023
1 parent 9d22d88 commit a41aab2
Showing 1 changed file with 20 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Builds and pushes docker images on main and tags

name: Analyze
name: SonarCloud QA
on:
push:
branches:
- main
paths:
- ".github/workflows/sonarcloud.yaml"
- "pom.xml"
- "src/**"
pull_request:
types: [opened, synchronize, reopened]

Expand All @@ -13,13 +17,18 @@ jobs:
name: Build and Analyze
runs-on: ubuntu-latest
timeout-minutes: 60
# Only analyze with Sonar on non-fork repos:
# https://github.community/t/how-to-detect-a-pull-request-from-a-fork/18363/4
# if: github.event.pull_request.head.repo.fork != true
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
submodules: recursive
show-progress: 'false'
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
Expand All @@ -33,13 +42,17 @@ jobs:

- name: Build customized GeoServer version
run: |
make deps
make deps
- name: Analyze
- name: Analyze with Sonar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=geoserver_geoserver-cloud -ntp -DskipTests
#mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=geoserver_geoserver-cloud
./mvnw package org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-Dsonar.projectKey=geoserver_geoserver-cloud \
-Dsonar.organization=geoserver \
-DskipTests \
-Dmaven.javadoc.skip=true \
-ntp

0 comments on commit a41aab2

Please sign in to comment.