diff --git a/.github/workflows/SonarCloud.yml b/.github/workflows/SonarCloud.yml
new file mode 100644
index 000000000..902b142ca
--- /dev/null
+++ b/.github/workflows/SonarCloud.yml
@@ -0,0 +1,41 @@
+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 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: 17
+ distribution: 'zulu' # Alternative distribution options are available.
+ - 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:
+ SPECIFIC_DAY: "2024-01-03"
+ ARCHIVE_MODE: HOUR
+ TEST_MAIL : ${{ secrets.TEST_MAIL }}
+ TEST_PASSWORD : ${{ secrets.TEST_PASSWORD }}
+ 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=MathieuSoysal_CROUS-assistant-Collector
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index fbc973bd2..eda15eea9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
${java.version}
${java.version}
${java.version}
- 5.8.2
+ 5.9.0
3.2.2
@@ -118,6 +118,37 @@
+
+ coverage
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.10
+
+
+ prepare-agent
+
+ prepare-agent
+
+
+
+ report
+
+ report
+
+
+
+ XML
+
+
+
+
+
+
+
+
Archiving
@@ -137,26 +168,62 @@
-
- maven-clean-plugin
- 3.1.0
-
+
+ maven-surefire-plugin
+ 3.0.0
+
+
+ maven-project-info-reports-plugin
+ 3.4.3
+
+
+ maven-clean-plugin
+ 3.1.0
+
+
+ maven-compiler-plugin
+ 3.11.0
+
+
+ maven-jar-plugin
+ 3.0.2
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.10
+
+
+
+ prepare-agent
+
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ package
+
+ report
+
+
+
+ report
+ prepare-package
+
+ report
+
+
+
+
maven-resources-plugin
3.1.0
-
- maven-compiler-plugin
- 3.8.1
-
-
- maven-surefire-plugin
- 3.0.0-M4
-
-
- maven-jar-plugin
- 3.2.0
-
maven-install-plugin
3.0.0-M1