Skip to content

Commit 5423fe7

Browse files
committed
again checking SonarQube
1 parent da1357e commit 5423fe7

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
name: Java CI
2-
3-
on:
4-
- push
5-
- pull_request
6-
7-
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
11-
steps:
121
name: SonarQube
132
on:
143
push:
@@ -22,18 +11,13 @@ jobs:
2211
runs-on: ubuntu-latest
2312
steps:
2413
- uses: actions/checkout@v4
25-
- uses: actions/setup-java@v4
2614
with:
27-
java-version: '21'
28-
distribution: 'temurin'
29-
- name: Setup Gradle
30-
uses: gradle/actions/setup-gradle@v4
15+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v4
3118
with:
32-
fetch-depth: 0
33-
- name: Execute Gradle build
34-
run: ./gradlew build
35-
- name: Generate coverage report
36-
run: make report
19+
java-version: 17
20+
distribution: 'zulu' # Alternative distribution options are available
3721
- name: Cache SonarQube packages
3822
uses: actions/cache@v4
3923
with:
@@ -47,6 +31,7 @@ jobs:
4731
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
4832
restore-keys: ${{ runner.os }}-gradle
4933
- name: Build and analyze
34+
working-directory: ./app
5035
env:
5136
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
52-
run: cd app && ./gradlew build sonar -info
37+
run: ./gradlew build sonar --info

0 commit comments

Comments
 (0)