build(deps): bump gradle/wrapper-validation-action from ccb4328a959376b642e027874838f60f8e596de3 to 56b90f209b02bf6d1deae490e9ef18b21a389cd4 #770
Workflow file for this run
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: Code Analysis | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [main] | |
paths-ignore: | |
- "**.md" | |
- "docs/**" | |
jobs: | |
is_java_project: | |
runs-on: ubuntu-latest | |
outputs: | |
pom_exists: ${{ steps.check_files.outputs.files_exists }} | |
checkstyle_active: ${{ steps.check_checkstyle.outputs.checkstyle_active }} | |
spotbugs_active: ${{ steps.check_spotbugs.outputs.spotbugs_active }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Check file existence | |
id: check_files | |
uses: andstor/file-existence-action@v2 | |
with: | |
files: "pom.xml" | |
- name: check_checkstyle | |
id: check_checkstyle | |
run: echo "checkstyle_active=$(if grep -q "<artifactId>maven-checkstyle-plugin</artifactId>" pom.xml; then echo "true"; else echo "false"; fi)" >> $GITHUB_OUTPUT | |
- name: check_spotbugs | |
id: check_spotbugs | |
run: echo "spotbugs_active=$(if grep -q "<artifactId>spotbugs-maven-plugin</artifactId>" pom.xml; then echo "true"; else echo "false"; fi)" >> $GITHUB_OUTPUT | |
run_checkstyle: | |
needs: [is_java_project] | |
if: needs.is_java_project.outputs.pom_exists == 'true' && needs.is_java_project.outputs.checkstyle_active == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
cache: "maven" | |
- name: Run style checks | |
run: mvn -B checkstyle:check --file pom.xml | |
run_spotbugs: | |
needs: [is_java_project] | |
if: needs.is_java_project.outputs.pom_exists == 'true' && needs.is_java_project.outputs.spotbugs_active == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
cache: "maven" | |
- name: Run static code analysis | |
run: mvn -B compile spotbugs:check --file pom.xml |