feat:[NEXT-1926] Added Optional tags (#2388) #5467
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-Build | |
| on: | |
| push: | |
| branches: [master, v*, release-v*] | |
| pull_request: | |
| branches: [master, v*, release-v*] | |
| jobs: | |
| sonarcloudBuild: | |
| name: SonarCloud-Build | |
| 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 8 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'corretto' | |
| java-version: 8 | |
| - name: running update | |
| run: sudo apt update | |
| - name: Install maven | |
| run: | | |
| sudo apt install maven -y | |
| - 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 pull_request | |
| if: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| run: | | |
| export MAVEN_OPTS="-Xmx4000m -XX:+UnlockDiagnosticVMOptions -XX:GCLockerRetryAllocationCount=100" | |
| export SONAR_SCANNER_OPTS="-Xmx4000m" | |
| mvn -B -DskipTests=true -Dmaven.javadoc.skip=true -Dsonar.skip=true clean verify | |
| - name: Build and analyze push | |
| if: ${{ github.event_name == 'push' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| run: | | |
| export MAVEN_OPTS="-Xmx4000m -XX:+UnlockDiagnosticVMOptions -XX:GCLockerRetryAllocationCount=100" | |
| export SONAR_SCANNER_OPTS="-Xmx4000m" | |
| mvn -B -DskipTests=true -Dmaven.javadoc.skip=true -Dsonar.skip=true clean verify |