-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
109 additions
and
292 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: SonarCloud | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
jobs: | ||
build: | ||
name: Build and analyze | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
- name: maven-settings-xml-action | ||
uses: whelk-io/maven-settings-xml-action@v21 | ||
with: | ||
repositories: '[ | ||
{ "id": "spring-milestone", "url": "https://repo.spring.io/milestone/"}, | ||
{ "id": "oss-sonatype", "url": "https://oss.sonatype.org/service/local/repositories/releases/content/"} | ||
]' | ||
plugin_repositories: '[{ "id": "spring-milestone", "url": "https://repo.spring.io/milestone/"}]' | ||
active_profiles: '["github"]' | ||
- 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: Extract Maven project version | ||
run: | | ||
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | ||
- name: Show extracted Maven project version | ||
run: | | ||
echo "RELEASE_VERSION: ${{ env.RELEASE_VERSION}}" | ||
- name: Build and analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn -B -e -V clean package jacoco:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar | ||
-Dmaven.test.redirectTestOutputToFile=false | ||
-Djava.net.preferIPv4Stack=true | ||
-Dsurefire.useFile=false | ||
-DbuildVersion=${{ env.RELEASE_VERSION }} | ||
-Dskip-sonarsource-repo=true | ||
-Pjacoco -Djacoco.includes="org.ligoj.app.plugin.storage.*" | ||
-Dsonar.projectKey="org.ligoj.plugin:plugin-storage" | ||
-Dsonar.javascript.exclusions="node_modules,dist" | ||
-Dsonar.host.url="https://sonarcloud.io" | ||
-Dsonar.organization=ligoj-github | ||
-Dsonar.projectVersion=${{ steps.version.outputs.version }} | ||
-Dmaven.javadoc.skip=true | ||
-Dmaven.ut.reuseForks=true -Dmaven.it.reuseForks=false | ||
-Djava.awt.headless=true |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.ligoj.api</groupId> | ||
<artifactId>plugin-parent</artifactId> | ||
<version>3.3.0</version> | ||
<relativePath /> | ||
</parent> | ||
|
||
<groupId>org.ligoj.plugin</groupId> | ||
<artifactId>plugin-storage</artifactId> | ||
<version>1.0.2-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>Ligoj - Plugin Storage</name> | ||
|
||
<scm> | ||
<connection>scm:git:https://github.com/ligoj/plugin-storage</connection> | ||
<developerConnection>scm:git:https://github.com/ligoj/plugin-storage</developerConnection> | ||
<url>https://github.com/ligoj/plugin-storage.git</url> | ||
</scm> | ||
|
||
<properties> | ||
<sonar.sources>src/main/java</sonar.sources> | ||
</properties> | ||
|
||
<profiles> | ||
<profile> | ||
<id>github</id> | ||
<distributionManagement> | ||
<repository> | ||
<id>github-ligoj</id> | ||
<url>https://maven.pkg.github.com/ligoj/plugin-storage</url> | ||
</repository> | ||
</distributionManagement> | ||
</profile> | ||
</profiles> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.ligoj.api</groupId> | ||
<artifactId>plugin-parent</artifactId> | ||
<version>4.0.5</version> | ||
<relativePath /> | ||
</parent> | ||
|
||
<groupId>org.ligoj.plugin</groupId> | ||
<artifactId>plugin-storage</artifactId> | ||
<version>1.0.2-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>Ligoj - Plugin Storage</name> | ||
|
||
<scm> | ||
<connection>scm:git:https://github.com/ligoj/plugin-storage</connection> | ||
<developerConnection>scm:git:https://github.com/ligoj/plugin-storage</developerConnection> | ||
<url>https://github.com/ligoj/plugin-storage.git</url> | ||
</scm> | ||
|
||
<properties> | ||
<sonar.sources>src/main/java</sonar.sources> | ||
</properties> | ||
|
||
<profiles> | ||
<profile> | ||
<id>github</id> | ||
<distributionManagement> | ||
<repository> | ||
<id>github-ligoj</id> | ||
<url>https://maven.pkg.github.com/ligoj/plugin-storage</url> | ||
</repository> | ||
</distributionManagement> | ||
</profile> | ||
</profiles> | ||
</project> |
This file contains 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
Oops, something went wrong.