Skip to content

Commit

Permalink
Merge pull request #390 from jenkinsci/java17
Browse files Browse the repository at this point in the history
Use Java 17 as a baseline
  • Loading branch information
uhafner authored Nov 12, 2024
2 parents 702703a + 2a13ea2 commit 2e3705d
Show file tree
Hide file tree
Showing 2 changed files with 177 additions and 3 deletions.
176 changes: 175 additions & 1 deletion .github/workflows/quality-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ jobs:
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.9
- name: Cache the NVD database
uses: actions/cache@v4
with:
path: ~/.m2/repository/org/owasp/dependency-check-data
key: dependency-check
- name: Build with Maven
env:
BROWSER: chrome-container
run: mvn -V --color always -ntp clean verify -Ppit -Pci | tee maven.log
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
run: mvn -V --color always -ntp clean verify -Ppit -Pci -Powasp | tee maven.log
- name: Extract pull request number
uses: jwalton/gh-find-current-pr@v1
id: pr
Expand All @@ -36,3 +42,171 @@ 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-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"
}
]
},
{
"name": "Vulnerabilities",
"id": "vulnerabilities",
"icon": "shield",
"tools": [
{
"id": "owasp-dependency-check",
"pattern": "**/target/dependency-check-report.json"
}
]
}
],
"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"
},
{
"id": "pit",
"name": "Test Strength",
"metric": "test-strength",
"sourcePath": "src/main/java",
"pattern": "**/target/pit-reports/mutations.xml"
}
]
}
],
"metrics":
{
"name": "Toplevel Metrics",
"tools": [
{
"name": "Cyclomatic Complexity",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "CYCLOMATIC_COMPLEXITY"
},
{
"name": "Cognitive Complexity",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "COGNITIVE_COMPLEXITY"
},
{
"name": "Lines of Code",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "LOC"
},
{
"name": "Non Commenting Source Statements",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "NCSS"
},
{
"name": "Access to foreign data",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "ACCESS_TO_FOREIGN_DATA"
},
{
"name": "Class cohesion",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "COHESION"
},
{
"name": "Fan out",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "FAN_OUT"
},
{
"name": "Number of accessors",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "NUMBER_OF_ACCESSORS"
},
{
"name": "Weight of a class",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "WEIGHT_OF_CLASS"
},
{
"name": "Weighted method count",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "WEIGHED_METHOD_COUNT"
},
{
"name": "N-Path Complexity",
"id": "metrics",
"pattern": "**/metrics/pmd.xml",
"metric": "NPATH_COMPLEXITY"
}
]
}
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jvnet.hudson.plugins</groupId>
<artifactId>analysis-pom</artifactId>
<version>9.0.0</version>
<version>10.0.0</version>
<relativePath />
</parent>

Expand All @@ -27,7 +27,7 @@
<j2html.version>1.4.0</j2html.version>
<streamex.version>0.8.3</streamex.version>
<testcontainers.version>1.20.3</testcontainers.version>
<codingstyle.library.version>4.13.0</codingstyle.library.version>
<codingstyle.library.version>5.2.0</codingstyle.library.version>
</properties>

<licenses>
Expand Down

0 comments on commit 2e3705d

Please sign in to comment.