fix static tests #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |