Skip to content

Bump the github-actions group with 3 updates #298

Bump the github-actions group with 3 updates

Bump the github-actions group with 3 updates #298

Workflow file for this run

name: Quality Gates
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
permissions:
contents: read
jobs:
static-analysis:
name: Static analysis (no tests)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: temurin
java-version: 21
cache: maven
- name: Run static quality plugins
run: mvn -B -DskipTests checkstyle:check pmd:check spotbugs:check
- name: Upload checkstyle report
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: checkstyle-report
path: target/checkstyle-result.xml
if-no-files-found: ignore
retention-days: 7
- name: Upload pmd report
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: pmd-report
path: target/pmd.xml
if-no-files-found: ignore
retention-days: 7
- name: Upload spotbugs report
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: spotbugs-report
path: target/spotbugsXml.xml
if-no-files-found: ignore
retention-days: 7
sonarcloud:
name: SonarCloud analysis
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: temurin
java-version: 21
cache: maven
- name: Build and analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >-
mvn -B verify sonar:sonar
-Dsonar.qualitygate.wait=true
-Dsonar.qualitygate.timeout=300