-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (56 loc) · 1.57 KB
/
verify.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Verify
permissions:
checks: write
contents: read
on:
workflow_dispatch:
push:
branches-ignore:
- 'release/**'
concurrency:
group: verify-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-and-verify:
name: Verify
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven
- name: Verify
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn -B -U -ntp install -P verify -e
mvn -B -U -ntp sonar:sonar -P verify -e
- name: Build Surefire report
uses: ScaCap/action-surefire-report@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_if_no_tests: false
fail_on_test_failures: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sonar Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
scanMetadataReportFile: target/sonar/report-task.txt