Skip to content

Renovate library, update examples, and change ownership #1

Renovate library, update examples, and change ownership

Renovate library, update examples, and change ownership #1

name: Java CI with Maven and SonarCloud
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
types: [opened, synchronize, reopened]
jobs:
build-and-analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Necessary for a comprehensive SonarCloud analysis
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
- name: Cache Maven and SonarCloud packages
uses: actions/cache@v3
with:
path: |
~/.m2
~/.sonar/cache
key: ${{ runner.os }}-m2-sonar-${{ hashFiles('**/pom.xml') }}
- name: Build and analyze with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify --file pom.xml org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -PcoverageReport