Skip to content

Stop Sonarqube in Dependabot PRs #782

Stop Sonarqube in Dependabot PRs

Stop Sonarqube in Dependabot PRs #782

Workflow file for this run

# Build the project and run unit tests
name: integration
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache SonarCloud packages
if: github.actor != 'dependabot[bot]'
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: |
${{ runner.os }}-sonar
- name: Build and test
run: |
chmod +x ./mvnw
./mvnw -B verify
- name: SonarCloud Analysis
if: github.actor != 'dependabot[bot]'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
./mvnw -B sonar:sonar