docs: [MMC-180] add link opeanapi documentation to README #236
This file contains hidden or 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
name: SonarCloud Analysis | |
on: | |
push: | |
branches: | |
- main | |
- release-* | |
pull_request: | |
types: | |
- opened | |
- edited | |
- synchronize | |
jobs: | |
sonarcloud: | |
name: SonarCloud Analysis | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 # Fetch all history for all branches and tags | |
- name: Set up JDK 21 | |
uses: actions/[email protected] | |
with: | |
distribution: 'adopt' | |
java-version: '21' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Setup Maven Settings | |
run: | | |
mkdir -p ~/.m2 | |
echo '<settings><servers><server><id>github</id><username></username><password>${{ secrets.GITHUB_TOKEN }}</password></server></servers></settings>' > ~/.m2/settings.xml | |
- name: Build and test with Maven | |
run: mvn clean org.jacoco:jacoco-maven-plugin:0.8.11:prepare-agent verify org.jacoco:jacoco-maven-plugin:0.8.11:report org.jacoco:jacoco-maven-plugin:0.8.11:report-aggregate -B | |
- name: Generate JaCoCo XML Report | |
run: mvn org.jacoco:jacoco-maven-plugin:0.8.11:report -Djacoco.reportFormat=xml -B | |
- name: SonarCloud Scan | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mvn sonar:sonar \ | |
-Dsonar.projectKey=${{ vars.SONARCLOUD_PROJECT_KEY }} \ | |
-Dsonar.organization=${{ vars.SONARCLOUD_ORG }} \ | |
-Dsonar.host.url=https://sonarcloud.io \ | |
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \ | |
-Dsonar.java.binaries=target/classes \ | |
-Dsonar.junit.reportPaths=target/surefire-reports \ | |
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml \ | |
-Dsonar.exclusions=**/configuration/**,**/enums/**,**/model/**,**/stub/**,**/dto/**,**/*Constant*,**/*Config.java,**/*Scheduler.java,**/*Application.java,**/src/test/**,**/Dummy*.java | |
- name: Fetch all branches | |
run: git fetch --all |