Skip to content

Commit c91c539

Browse files
committed
up github action
1 parent ae9612f commit c91c539

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,11 @@ jobs:
2424
with:
2525
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
2626

27-
- name: Set up JDK 11
28-
uses: actions/setup-java@v4
27+
- name: Set up JDK 17
28+
uses: actions/setup-java@v3
2929
with:
3030
distribution: 'temurin'
31-
java-version: 11
32-
33-
- name: Cache SonarQube packages
34-
uses: actions/cache@v4
35-
with:
36-
path: ~/.sonar/cache
37-
key: ${{ runner.os }}-sonar
38-
restore-keys: ${{ runner.os }}-sonar
31+
java-version: 17
3932

4033
- name: Cache Maven packages
4134
uses: actions/cache@v3
@@ -44,8 +37,18 @@ jobs:
4437
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
4538
restore-keys: ${{ runner.os }}-m2
4639

47-
- name: Build and analyze
40+
- name: Verify
41+
run: ./mvnw -e -B verify
42+
43+
- name: Cache SonarQube packages
44+
uses: actions/cache@v4
45+
with:
46+
path: ~/.sonar/cache
47+
key: ${{ runner.os }}-sonar
48+
restore-keys: ${{ runner.os }}-sonar
49+
50+
- name: SonarQube Scan
4851
env:
4952
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
5053
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
51-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_creedengo-python
54+
run: mvn -e -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_creedengo-python

0 commit comments

Comments
 (0)