You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by ga...@apache.org on 2023/03/21 11:51:13 UTC
[xmlgraphics-commons] branch skynavga/add-workflow-sonar updated: Replace sonar configuration with Sonar Maven recommended CI configuration
This is an automated email from the ASF dual-hosted git repository.
gadams pushed a commit to branch skynavga/add-workflow-sonar
in repository https://gitbox.apache.org/repos/asf/xmlgraphics-commons.git
The following commit(s) were added to refs/heads/skynavga/add-workflow-sonar by this push:
new 85be07a Replace sonar configuration with Sonar Maven recommended CI configuration
85be07a is described below
commit 85be07a62b42d31fd22f5f1782199684d2d5f2d5
Author: Glenn Adams <gl...@skynav.com>
AuthorDate: Tue Mar 21 06:50:47 2023 -0500
Replace sonar configuration with Sonar Maven recommended CI configuration
---
.github/workflows/sonarcloud.yml | 42 ++++++++++++++++++++++++++--------------
pom.xml | 6 ++----
2 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
index 8386a3d..a7ee60e 100644
--- a/.github/workflows/sonarcloud.yml
+++ b/.github/workflows/sonarcloud.yml
@@ -1,25 +1,39 @@
-name: SonarCloud analysis
-
+name: SonarCloud Analysis
on:
push:
- branches: [ "main" ]
+ branches:
+ - main
pull_request:
- branches: [ "main" ]
- workflow_dispatch:
-
+ types: [opened, synchronize, reopened]
permissions:
pull-requests: read
-
jobs:
- Analysis:
+ build:
+ name: Build and analyze
runs-on: ubuntu-latest
steps:
- - name: Analyze with SonarCloud
- uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0 # disable shallow clone
+ - name: Set up JDK 11
+ uses: actions/setup-java@v3
+ with:
+ java-version: 11
+ distribution: 'temurin'
+ - name: Cache SonarCloud packages
+ uses: actions/cache@v3
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+ - name: Cache Maven packages
+ uses: actions/cache@v3
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
- with:
- args:
- -Dsonar.organization=apache
- -Dsonar.projectKey=xmlgraphics-commons
+ run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=xmlgraphics-commons
diff --git a/pom.xml b/pom.xml
index 8e01ca4..0545751 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,8 +5,8 @@
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
<version>2.8.0-SNAPSHOT</version>
- <name>${project.groupId}:${project.artifactId}</name>
- <description>XML Graphics Commons</description>
+ <name>Apache XML Graphics Commons</name>
+ <description>XML Graphics Common Support</description>
<url>http://xmlgraphics.apache.org/commons/</url>
<properties>
@@ -21,8 +21,6 @@
<release.version>2.5.2</release.version>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.organization>apache</sonar.organization>
- <sonar.projectKey>xmlgraphics-commons</sonar.projectKey>
- <sonar.projectName>Apache XML Graphics Commons</sonar.projectName>
<surefire.version>2.18.1</surefire.version>
<jdk.path>${env.JAVA_HOME}</jdk.path>
</properties>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org