Skip to content

configure sonar-lint #4

configure sonar-lint

configure sonar-lint #4

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Java CI with Maven
on:
pull_request:
branches: [ "develop" , "main"]
workflow_dispatch:
jobs:
build_test_analyze:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Set up JSK 17
uses: actions/setup-java@main
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- uses: actions/cache@main
with:
path: |
target
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Analyze with SonarCloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >
mvn -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.projectKey=entrevistador-inteligente-${{ github.event.repository.name }}
-Dsonar.organization=entrevistador-inteligente
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.qualitygate.wait=true