-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.09 KB
/
analysis.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
name: "Static Analysis"
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
types: [ labeled ]
permissions:
checks: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
cancel-in-progress: true
jobs:
spotbugs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
# Install required tools
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: "corretto"
java-version: "11"
- name: Give permission to gradlew
run: chmod +x gradlew
# Run tests
- name: Run Spotbugs
run: ./gradlew clean spotbugs
# Show Spotbugs report
- name: Show Spotbugs report
uses: jwgmeligmeyling/spotbugs-github-action@master
with:
path: "build/reports/spotbugs/main/spotbugs.xml"
if: failure()
# Stop Gradle daemon
- name: Stop Gradle
run: ./gradlew --stop
if: always()