Skip to content

Commit

Permalink
Add badges to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Nov 30, 2023
1 parent 76589d3 commit a9eb165
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 96 deletions.
88 changes: 33 additions & 55 deletions .github/workflows/reporting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
pull_request:

jobs:
coverage:
Expand Down Expand Up @@ -37,7 +36,6 @@ jobs:
uses: uhafner/[email protected]
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEAD_SHA: ${{github.event.pull_request.head.sha}}
CONFIG: >
{
"tests": {
Expand All @@ -54,45 +52,32 @@ jobs:
"failureImpact": -5,
"maxScore": 100
},
"analysis": [
{
"name": "Style",
"id": "style",
"tools": [
{
"id": "checkstyle",
"name": "CheckStyle",
"pattern": "**/target/checkstyle-result.xml"
},
{
"id": "pmd",
"name": "PMD",
"pattern": "**/target/pmd.xml"
}
],
"errorImpact": -1,
"highImpact": -1,
"normalImpact": -1,
"lowImpact": -1,
"maxScore": 100
},
{
"name": "Bugs",
"id": "bugs",
"tools": [
{
"id": "spotbugs",
"name": "SpotBugs",
"pattern": "**/target/spotbugsXml.xml"
}
],
"errorImpact": -3,
"highImpact": -3,
"normalImpact": -3,
"lowImpact": -3,
"maxScore": 100
}
],
"analysis": {
"name": "Warnings",
"id": "warnings",
"tools": [
{
"id": "checkstyle",
"name": "CheckStyle",
"pattern": "**/target/checkstyle-result.xml"
},
{
"id": "pmd",
"name": "PMD",
"pattern": "**/target/pmd.xml"
},
{
"id": "spotbugs",
"name": "SpotBugs",
"pattern": "**/target/spotbugsXml.xml"
}
],
"errorImpact": -1,
"highImpact": -1,
"normalImpact": -1,
"lowImpact": -1,
"maxScore": 100
},
"coverage": [
{
"tools": [
Expand Down Expand Up @@ -136,38 +121,31 @@ jobs:
- name: Generate the badge SVG image for the line coverage
uses: emibcn/[email protected]
with:
label: 'Line coverage'
label: 'Lines'
status: ${{ steps.metrics.outputs.line }}%
color: 'green'
path: badges/line-coverage.svg
- name: Generate the badge SVG image for the branch coverage
uses: emibcn/[email protected]
with:
label: 'Branch coverage'
label: 'Branches'
status: ${{ steps.metrics.outputs.branch }}%
color: 'green'
path: badges/branch-coverage.svg
- name: Generate the badge SVG image for the mutation coverage
uses: emibcn/[email protected]
with:
label: 'Mutation coverage'
label: 'Mutations'
status: ${{ steps.metrics.outputs.mutation }}%
color: 'green'
path: badges/mutation-coverage.svg
- name: Generate the badge SVG image for the style warnings
- name: Generate the badge SVG image for the warnings
uses: emibcn/[email protected]
with:
label: 'Style warnings'
status: ${{ steps.metrics.outputs.style }}
label: 'Warnings'
status: ${{ steps.metrics.outputs.warnings }}
color: 'orange'
path: badges/style-warnings.svg
- name: Generate the badge SVG image for the potential bugs
uses: emibcn/[email protected]
with:
label: 'Potential Bugs'
status: ${{ steps.metrics.outputs.bugs }}
color: 'red'
path: badges/bugs.svg
path: badges/warnings.svg
- name: Commit badge
continue-on-error: true
run: |
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
[![Join the chat at Gitter/Matrix](https://badges.gitter.im/jenkinsci/warnings-plugin.svg)](https://gitter.im/jenkinsci/warnings-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Jenkins](https://ci.jenkins.io/job/Plugins/job/analysis-model/job/main/badge/icon?subject=Jenkins%20CI)](https://ci.jenkins.io/job/Plugins/job/analysis-model/job/main/)
[![CI on all platforms](https://github.com/jenkinsci/analysis-model/workflows/GitHub%20CI/badge.svg)](https://github.com/jenkinsci/analysis-model/actions)
[![codecov](https://codecov.io/gh/jenkinsci/analysis-model/branch/master/graph/badge.svg)](https://codecov.io/gh/jenkinsci/analysis-model)
[![CodeQL](https://github.com/jenkinsci/analysis-model/workflows/CodeQL/badge.svg)](https://github.com/jenkinsci/analysis-model/actions/workflows/codeql.yml)
[![Line Coverage](https://raw.githubusercontent.com/jenkinsci/analysis-model/main/badges/line-coverage.svg)](https://app.codecov.io/gh/jenkinsci/analysis-model)
[![Branch Coverage](https://raw.githubusercontent.com/jenkinsci/analysis-model/main/badges/branch-coverage.svg)](https://app.codecov.io/gh/jenkinsci/analysis-model)
[![Mutation Coverage](https://raw.githubusercontent.com/jenkinsci/analysis-model/main/badges/mutation-coverage.svg)](https://github.com/jenkinsci/analysis-model/actions/workflows/reporting.yml)

This library provides a Java object model to read, aggregate, filter, and query static analysis reports.
It is used by [Jenkins' warnings next generation plug-in](https://github.com/jenkinsci/warnings-ng-plugin) to visualize
Expand Down
20 changes: 0 additions & 20 deletions badges/bugs.svg

This file was deleted.

20 changes: 0 additions & 20 deletions badges/style-warnings.svg

This file was deleted.

0 comments on commit a9eb165

Please sign in to comment.