diff --git a/.github/workflows/check-md-links.yml b/.github/workflows/check-md-links.yml index 016aa16..b543ee5 100644 --- a/.github/workflows/check-md-links.yml +++ b/.github/workflows/check-md-links.yml @@ -5,7 +5,7 @@ on: push jobs: check-markdown-links: name: 'Check Markdown links' - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: umbrelladocs/action-linkspector@v1.4.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3da1bb9..418482a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - jdk: [17, 21, 25] + jdk: [21, 25] runs-on: ${{ matrix.platform }} name: on ${{ matrix.platform }} with JDK ${{ matrix.jdk }} @@ -33,4 +33,4 @@ jobs: - name: Build with Maven env: BROWSER: chrome-container - run: mvn -V --color always -ntp clean verify '-Djenkins.test.timeout=5000' '-Dgpg.skip' -Pno-ui-tests + run: mvn -V --color always -ntp clean verify -Pci -Pno-ui-tests '-Djenkins.test.timeout=5000' '-Dgpg.skip' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c806125..9bd7485 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -29,7 +29,7 @@ jobs: uses: actions/setup-java@v5 with: distribution: temurin - java-version: 21 + java-version: 25 cache: maven - name: Set up Maven diff --git a/.github/workflows/quality-monitor-build.yml b/.github/workflows/quality-monitor-build.yml index 2d11c1b..452bebe 100644 --- a/.github/workflows/quality-monitor-build.yml +++ b/.github/workflows/quality-monitor-build.yml @@ -11,11 +11,11 @@ jobs: steps: - name: Checkout PR uses: actions/checkout@v5 - - name: Set up JDK 21 + - name: Set up JDK uses: actions/setup-java@v5 with: distribution: 'temurin' - java-version: 21 + java-version: 25 check-latest: true cache: 'maven' - name: Set up Maven diff --git a/.github/workflows/update-badges.yml b/.github/workflows/update-badges.yml index df0b6e7..496cf77 100644 --- a/.github/workflows/update-badges.yml +++ b/.github/workflows/update-badges.yml @@ -13,98 +13,49 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Set up JDK 21 + - name: Set up JDK uses: actions/setup-java@v5 with: distribution: 'temurin' - java-version: '21' + java-version: '25' check-latest: true cache: 'maven' - name: Set up Maven uses: stCarolas/setup-maven@v5 with: maven-version: 3.9.11 + - name: Check if quality monitor reports mutation coverage + run: | + FILE='.github/quality-monitor.json' + PATTERN='target/pit-reports/mutations.xml' + if [ -f "$FILE" ]; then + if grep -q "$PATTERN" "$FILE"; then + echo "PIT=-Ppit" >> "$GITHUB_ENV" + fi + fi + - name: Cache the NVD database + uses: actions/cache@v4 + with: + path: ~/.m2/repository/org/owasp/dependency-check-data + key: dependency-check - name: Build and test with Maven + env: + PIT: ${{ env.PIT }} run: | - mvn -V --color always -ntp clean verify -Pci -Ppit -Pdepgraph | tee maven.log + mvn -V --color always -ntp clean verify -Pci $PIT -Powasp -Pdepgraph | tee maven.log if [ "${PIPESTATUS[0]}" != "0" ]; then - exit 1; + exit 1; fi + touch target/dependency-check-report.json + - name: Read Quality Monitor Configuration + id: quality-monitor + run: echo "json=$(jq -c . .github/quality-monitor.json)" >> "$GITHUB_OUTPUT" - name: Run Quality Monitor uses: uhafner/quality-monitor@v3 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - config: > - { - "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", - "metric": "line", - "sourcePath": "src/main/java", - "pattern": "**/target/site/jacoco/jacoco.xml" - }, - { - "id": "jacoco", - "metric": "branch", - "sourcePath": "src/main/java", - "pattern": "**/target/site/jacoco/jacoco.xml" - } - ] - }, - { - "name": "Mutation Coverage", - "tools": [ - { - "id": "pit", - "metric": "mutation", - "sourcePath": "src/main/java", - "pattern": "**/target/pit-reports/mutations.xml" - }, - { - "id": "pit", - "metric": "test-strength", - "sourcePath": "src/main/java", - "pattern": "**/target/pit-reports/mutations.xml" - } - ] - } - ] - } + config: ${{ steps.quality-monitor.outputs.json }} + comments-strategy: ADD + title-metric: none - name: Write metrics to GitHub output id: metrics run: |