diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34d12011..2b26ada5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,6 @@ name: 'GitHub CI' on: push: branches: - - master - main pull_request: @@ -34,4 +33,4 @@ jobs: - name: Build with Maven env: BROWSER: chrome-container - run: mvn -V --color always -ntp clean verify --file pom.xml '-Djenkins.test.timeout=5000' '-Dgpg.skip' + run: mvn -V --color always -ntp clean verify '-Djenkins.test.timeout=5000' '-Dgpg.skip' '-Pci' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index af74477f..40048783 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -49,7 +49,7 @@ jobs: queries: +security-and-quality - name: Build with Maven - run: mvn -V --color always -ntp clean verify --file pom.xml -Pskip + run: mvn -V --color always -ntp clean verify -Pskip - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 28048376..bada6d36 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -3,7 +3,6 @@ name: 'CodeCov' on: push: branches: - - master - main pull_request: @@ -27,7 +26,7 @@ jobs: with: maven-version: 3.9.6 - name: Generate coverage with JaCoCo - run: mvn -V --color always -ntp clean verify '-Dgpg.skip' + run: mvn -V --color always -ntp clean verify -Dgpg.skip -Pci - name: Upload coverage to Codecov uses: codecov/codecov-action@v4.3.1 with: diff --git a/.github/workflows/quality-monitor.yml b/.github/workflows/quality-monitor.yml index c1942da1..71a037ab 100644 --- a/.github/workflows/quality-monitor.yml +++ b/.github/workflows/quality-monitor.yml @@ -25,7 +25,7 @@ jobs: - name: Build with Maven env: BROWSER: chrome-container - run: mvn -V --color always -ntp clean verify -Ppit | tee maven.log + run: mvn -V --color always -ntp clean verify -Ppit -Pci | tee maven.log - name: Extract pull request number uses: jwalton/gh-find-current-pr@v1 id: pr @@ -34,3 +34,81 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} pr-number: ${{ steps.pr.outputs.number }} + config: > + { + "tests": { + "tools": [ + { + "id": "test", + "name": "Tests", + "pattern": "**/target/*-reports/TEST*.xml" + } + ], + "name": "Tests" + }, + "analysis": [ + { + "name": "Style", + "id": "style", + "tools": [ + { + "id": "checkstyle", + "pattern": "**/target/checkstyle-*/checkstyle-result.xml" + }, + { + "id": "pmd", + "pattern": "**/target/pmd-*/pmd.xml" + } + ] + }, + { + "name": "Bugs", + "id": "bugs", + "icon": "bug", + "tools": [ + { + "id": "spotbugs", + "sourcePath": "src/main/java", + "pattern": "**/target/spotbugsXml.xml" + }, + { + "id": "error-prone", + "pattern": "**/maven.log" + } + ] + } + ], + "coverage": [ + { + "name": "Code Coverage", + "tools": [ + { + "id": "jacoco", + "name": "Line Coverage", + "metric": "line", + "sourcePath": "src/main/java", + "pattern": "**/target/site/jacoco/jacoco.xml" + }, + { + "id": "jacoco", + "name": "Branch Coverage", + "metric": "branch", + "sourcePath": "src/main/java", + "pattern": "**/target/site/jacoco/jacoco.xml" + } + ] + }, + { + "name": "Mutation Coverage", + "tools": [ + { + "id": "pit", + "name": "Mutation Coverage", + "metric": "mutation", + "sourcePath": "src/main/java", + "pattern": "**/target/pit-reports/mutations.xml" + } + ] + } + ] + } diff --git a/.github/workflows/update-badges.yml b/.github/workflows/update-badges.yml index 664c0d17..54f3ed54 100644 --- a/.github/workflows/update-badges.yml +++ b/.github/workflows/update-badges.yml @@ -1,4 +1,4 @@ -name: 'Quality badges' +name: 'Quality Badges' on: push: @@ -30,6 +30,84 @@ jobs: uses: uhafner/quality-monitor@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} + config: > + { + "tests": { + "tools": [ + { + "id": "test", + "name": "Tests", + "pattern": "**/target/*-reports/TEST*.xml" + } + ], + "name": "Tests" + }, + "analysis": [ + { + "name": "Style", + "id": "style", + "tools": [ + { + "id": "checkstyle", + "pattern": "**/target/checkstyle-*/checkstyle-result.xml" + }, + { + "id": "pmd", + "pattern": "**/target/pmd-*/pmd.xml" + } + ] + }, + { + "name": "Bugs", + "id": "bugs", + "icon": "bug", + "tools": [ + { + "id": "spotbugs", + "sourcePath": "src/main/java", + "pattern": "**/target/spotbugsXml.xml" + }, + { + "id": "error-prone", + "pattern": "**/maven.log" + } + ] + } + ], + "coverage": [ + { + "name": "Code Coverage", + "tools": [ + { + "id": "jacoco", + "name": "Line Coverage", + "metric": "line", + "sourcePath": "src/main/java", + "pattern": "**/target/site/jacoco/jacoco.xml" + }, + { + "id": "jacoco", + "name": "Branch Coverage", + "metric": "branch", + "sourcePath": "src/main/java", + "pattern": "**/target/site/jacoco/jacoco.xml" + } + ] + }, + { + "name": "Mutation Coverage", + "tools": [ + { + "id": "pit", + "name": "Mutation Coverage", + "metric": "mutation", + "sourcePath": "src/main/java", + "pattern": "**/target/pit-reports/mutations.xml" + } + ] + } + ] + } - name: Write metrics to GitHub output id: metrics run: | diff --git a/pom.xml b/pom.xml index 3f8c8bc5..64f1b595 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ edu.hm.hafner codingstyle-pom - 4.7.0 + 4.8.0