Skip to content

A command-line tool and GitHub action to publish your code analysis results

License

Unknown and 3 other licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING
Apache-2.0
LICENSE-APACHE
ISC
LICENSE-ISC
Notifications You must be signed in to change notification settings

digirati-labs/analysis-publisher

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Analysis Publisher

analysis-publisher is a tool that searches your project for code quality reports and publishes an aggregate to external services. A large variety of report formats are supported, and can currently be published to GitHub.

Codecov

Dual-licensed under ISC or ASL 2.0.

What publishers are supported?

Each publisher implementation may differ slightly in how issues are published, but ideally reports are published as line annotations on sections of code. All supported publishers are listed below:

What report formats are supported?

The analysis-model library from Jenkins is used to parse issue reports, and as such analysis-publisher supports all formats from the upstream Jenkins plugin.

Note: only a few of these publishers are currently registered, see IssueParserFactoryBuilder.java for a list of supported report parsers.

Usage

A Docker image is available containing a compiled binary of the analysis publisher application, which can be used to upload analysis reports in a GitHub action.

Command-Line

To get detailed help on the options available on the command-line see the output of:

analysis-publisher --help

At least one report specification must be given using the repeatable --report-type and --path options, as well as one publisher specification:

analysis-publisher --report-type=spotbugs --path=**/spotbugs.xml --publisher=github_check

By default publishers will be configured by environment variables set in the execution environment, but can be overriden using properties set on the command-line:

analysis-publisher --publisher=github_check \
  --property=github.repository garyttierney/analysis-publisher \
  --property=github.token TEST_TOKEN

Documentation on available publisher properties can be found in the documentation for the specific publisher listed above.

GitHub Actions

workflow "analysis-publisher/ci" {
  on = "push"
  resolves = [
    "analysis-publisher/ci/publish-analysis",
  ]
}

action "analysis-publisher/ci/analyze" {
  uses = "openjdk:11"
  runs = ["./gradlew", "check"]
}

action "analysis-publisher/ci/publish-analysis" {
  needs = ["analysis-publisher/ci/analyze"]
  secrets = ["GITHUB_TOKEN"]

  uses = "garyttierney/analysis-publisher@master"
  args = [
    "--report-type=checkstyle", "--path=**/checkstyle/*.xml",
    "--report-type=spotbugs", "--path=**/spotbugs/*.xml",
    "--publisher=github_check"
  ]
}

Examples

This repository publishes its own code quality reports with every commit, and can be seen in the check runs for each commit.

About

A command-line tool and GitHub action to publish your code analysis results

Topics

Resources

License

Unknown and 3 other licenses found

Licenses found

Unknown
LICENSE
Unknown
COPYING
Apache-2.0
LICENSE-APACHE
ISC
LICENSE-ISC

Stars

Watchers

Forks

Packages

No packages published