-
Notifications
You must be signed in to change notification settings - Fork 828
32 lines (29 loc) · 990 Bytes
/
sonarcloud.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
name: SonarCloud analysis
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
workflow_dispatch:
permissions:
pull-requests: read # allows SonarCloud to decorate PRs with analysis results
jobs:
Sonar-Test-Analysis:
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '17'
cache: 'gradle'
- name: Analyze with SonarCloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != ''
run: >-
./gradlew --no-daemon -Dspring.profiles.active=default,hsqldb -DfailOnPassedAfterRetry=false --no-daemon test jacocoTestReport || true;
./gradlew --no-daemon sonar;
./gradlew --no-daemon jacocoTestReport;