From af777c65c36b568a20a06c9eaece3c720041ecc6 Mon Sep 17 00:00:00 2001 From: Sander Ploegsma Date: Wed, 27 Sep 2023 14:24:30 +0200 Subject: [PATCH] Add checkstyle summary action for Gradle build --- .github/workflows/gradle.yml | 5 +++++ exercises/build.gradle | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index aa5dde808..0c20dad4b 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -26,6 +26,11 @@ jobs: run: ./gradlew compileStarterTestJava --continue - name: Run checkstyle run: ./gradlew check --exclude-task test --continue + - name: Create Checkstyle summary + uses: jwgmeligmeyling/checkstyle-github-action@master + with: + path: "**/build/reports/checkstyle/*.xml" + if: always() test: runs-on: ubuntu-latest diff --git a/exercises/build.gradle b/exercises/build.gradle index 8a13ee1b3..a8328d6cc 100644 --- a/exercises/build.gradle +++ b/exercises/build.gradle @@ -80,6 +80,10 @@ subprojects { source = "src/test/java" } + tasks.withType(Checkstyle).configureEach { + reports.xml.required = true + } + // When running the standard test task, make sure we prepopulate the test source set with the // @Ignore-stripped tests. compileTestJava.dependsOn(copyTestsFilteringIgnores)