8000 Merge pull request #1147 from jscrdev/resolve-sonar-warning · rdk/cdk@f7fb94f · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 main >

Merge pull request #1147 from jscrdev/resolve-sonar-warning #1

Merge pull request #1147 from jscrdev/resolve-sonar-warning

Merge pull request #1147 from jscrdev/resolve-sonar-warning #1

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 21]
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: maven
- name: Build with Maven
run: mvn clean install -q
build-sonarcloud:
name: Build sonarcloud and codecov.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: maven
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
MAVEN_OPTS: -Xss16m -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=cdk -Pjacoco
- name: push JaCoCo stats to codecov.io
uses: codecov/codecov- 1A36 action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
0