diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml deleted file mode 100644 index a266d9c..0000000 --- a/.github/workflows/checkstyle.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Checkstyle - -on: [ pull_request ] - -jobs: - checkstyle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'adopt' - - name: Run Checkstyle - run: ./gradlew checkstyleMain checkstyleTest - - name: Upload Checkstyle results - uses: actions/upload-artifact@v4 - with: - name: checkstyle-results - path: build/reports/checkstyle/ \ No newline at end of file diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ae9cea7..85bac23 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,6 +1,6 @@ name: Java CI with Gradle -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read @@ -10,40 +10,40 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - cache: gradle - - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - - name: Build with Gradle - run: ./gradlew build -x test - - - name: Run tests - run: ./gradlew test - - - name: Publish Test Results - uses: actions/upload-artifact@v4 - if: always() - with: - name: test-results - path: | - build/reports/tests/test/ - build/test-results/test/ - - - name: Update status check - if: success() - run: echo "Tests passed" > status.txt || echo "Tests failed" > status.txt - - - name: Upload status check - uses: actions/upload-artifact@v4 - with: - name: status-check - path: status.txt + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Run Checkstyle + run: ./gradlew checkstyleMain checkstyleTest + + - name: Build with Gradle + run: ./gradlew build -x test + + - name: Run tests + run: ./gradlew test + + - name: Publish Test Results + uses: actions/upload-artifact@v4 + if: always() + with: + name: test-results + path: | + build/reports/tests/test/ + build/test-results/test/ + + - name: Publish Checkstyle Results + uses: actions/upload-artifact@v4 + if: always() + with: + name: checkstyle-results + path: build/reports/checkstyle/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index a9dc92d..bc6b600 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ plugins { checkstyle { toolVersion = "10.8.0" configFile = file("config/checkstyle/checkstyle.xml") - maxWarnings = 0 + maxWarnings = 30 } tasks.withType(Checkstyle).configureEach { diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 5578116..3a4884e 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -15,15 +15,10 @@ - - - - - - - + + @@ -32,8 +27,9 @@ - - + + + @@ -41,18 +37,14 @@ - - - - @@ -61,25 +53,10 @@ - - - - - - - - - - - - - - - \ No newline at end of file