-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (33 loc) · 947 Bytes
/
sonar.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Sonar CI
on:
workflow_dispatch:
push:
branches: [ master, develop ]
paths-ignore:
- '**.md'
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonar:
name: SonarCloud Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup - Java
uses: actions/setup-java@v3
with:
java-version: 11.0.x
distribution: 'adopt'
- name: Setup - Fetch complete history for all tags and branches
run: git fetch --prune --unshallow
- name: Restore - Maven Cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-:
- name: Analyze - SonarCloud Scan
run: mvn -B clean verify -Psonar -Dsonar.login=${{ secrets.SONAR_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}