File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: Copyright (C) 2025 Fabrício Barros Cabral
2+ # SPDX-License-Identifier: MIT
3+ ---
4+ name : java-sonar
5+ ' on ' :
6+ push :
7+ branches :
8+ - main
9+ jobs :
10+ java-sonar :
11+ timeout-minutes : 15
12+ runs-on : ubuntu-24.04
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+ - name : Setup Java SDK
17+ uses : actions/setup-java@v4
18+ with :
19+ java-version : 11
20+ distribution : ' temurin'
21+ - name : Configure Maven cache
22+ uses : actions/cache@v4
23+ with :
24+ path : ~/.m2/repository
25+ key : ubuntu-jdk-11-maven-${{ hashFiles('**/pom.xml') }}
26+ restore-keys : ubuntu-jdk-11-maven-
27+ - name : Configure Sonar cache
28+ uses : actions/cache@v4
29+ with :
30+ path : ~/.sonar/cache
31+ key : ${{ runner.os }}-sonar
32+ restore-keys : ${{ runner.os }}-sonar
33+ - name : Run sonar
34+ env :
35+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
37+ run : |
38+ mvn --batch-mode verify -Pjacoco -Dinvoker.skip \
39+ && mvn --batch-mode verify -Psonar -Dinvoker.skip \
40+ -Dsonar.qualitygate.wait=true
You can’t perform that action at this time.
0 commit comments