Skip to content

Commit 20814e0

Browse files
author
Oryan M
committed
Add sonar to workflow
1 parent 3dd693f commit 20814e0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/pull-request.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,20 @@ jobs:
2727
analyze:
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v2
30+
- name: Checkout
31+
uses: actions/checkout@v2
3132
- name: Setup java
3233
uses: actions/setup-java@v2
3334
with:
3435
java-version: '8'
36+
distribution: 'adopt'
37+
- name: Cache Maven packages
38+
uses: actions/cache@v2
39+
with:
40+
path: ~/.m2
41+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
42+
restore-keys: ${{ runner.os }}-m2
3543
- name: Analyze with SonarCloud
36-
run: mvn -B clean verify -Psonar -Dsonar.login=${{ secrets.SONAR_TOKEN }}
44+
run: mvn -B verify -Psonar -Dsonar.login=${{ secrets.SONAR_TOKEN }}
3745
env:
3846
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)