Skip to content

Commit 827856d

Browse files
authored
Merge pull request #9 from aochoae/feature/validations
SonarCloud integration using GitHub Actions to enable code quality and coverage analysis. Pipeline execution with JDK 8, 11, 17, 21, and 25 ensuring compatibility with this Java version.
2 parents 32ba4ac + 7aec2da commit 827856d

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

.github/workflows/workflow.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build & Test (8 & 21)
1+
name: Build & Test (8, 11, 17, 21, 25)
22

33
on:
44
push:
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
java: [8, 21]
20+
java: [8, 11, 17, 21, 25]
2121

2222
steps:
2323
- uses: actions/checkout@v4
@@ -28,4 +28,29 @@ jobs:
2828
java-version: ${{ matrix.java }}
2929
cache: maven
3030
- name: Build with Maven
31-
run: mvn -B package --file pom.xml
31+
run: mvn -B package --file pom.xml -Dgpg.skip=true
32+
33+
sonarcloud:
34+
runs-on: ubuntu-latest
35+
needs: build
36+
if: >-
37+
github.event_name == 'push' ||
38+
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false)
39+
steps:
40+
- uses: actions/checkout@v4
41+
with:
42+
fetch-depth: 0
43+
- name: Set up JDK 17
44+
uses: actions/setup-java@v4
45+
with:
46+
distribution: temurin
47+
java-version: 17
48+
cache: maven
49+
- name: SonarCloud analysis
50+
env:
51+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
52+
run: >-
53+
mvn -B verify sonar:sonar -Dgpg.skip=true
54+
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }}
55+
-Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }}
56+
-Dsonar.host.url=https://sonarcloud.io

pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<plugin>
4949
<groupId>org.apache.maven.plugins</groupId>
5050
<artifactId>maven-surefire-plugin</artifactId>
51-
<version>3.0.0-M5</version>
51+
<version>3.5.2</version>
5252
</plugin>
5353
<plugin>
5454
<groupId>org.jacoco</groupId>
@@ -79,7 +79,7 @@
7979
<plugin>
8080
<groupId>org.apache.maven.plugins</groupId>
8181
<artifactId>maven-source-plugin</artifactId>
82-
<version>2.2.1</version>
82+
<version>3.3.1</version>
8383
<configuration>
8484
<archive>
8585
<manifest>
@@ -103,9 +103,9 @@
103103
<plugin>
104104
<groupId>org.apache.maven.plugins</groupId>
105105
<artifactId>maven-javadoc-plugin</artifactId>
106-
<version>3.4.0</version>
106+
<version>3.11.2</version>
107107
<configuration>
108-
<source>11</source>
108+
<source>1.8</source>
109109
</configuration>
110110
<executions>
111111
<execution>
@@ -119,7 +119,7 @@
119119
<plugin>
120120
<groupId>org.apache.maven.plugins</groupId>
121121
<artifactId>maven-gpg-plugin</artifactId>
122-
<version>1.5</version>
122+
<version>3.2.7</version>
123123
<executions>
124124
<execution>
125125
<id>sign-artifacts</id>
@@ -133,7 +133,7 @@
133133
<plugin>
134134
<groupId>org.sonatype.plugins</groupId>
135135
<artifactId>nexus-staging-maven-plugin</artifactId>
136-
<version>1.6.13</version>
136+
<version>1.7.0</version>
137137
<extensions>true</extensions>
138138
<configuration>
139139
<serverId>ossrh</serverId>

0 commit comments

Comments
 (0)