Skip to content
list

GitHub Action

Publish Reports

v1.3.4 Latest version

Publish Reports

list

Publish Reports

Annotates files feeding from JUnit/AndroidLint/Checkstyle XML reports

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Publish Reports

uses: gmazzo/publish-report-annotations@v1.3.4

Learn more about this action in gmazzo/publish-report-annotations

Choose a version

GitHub Latest Build Status codecov Users

publish-report-annotations

Reports JUnit, Android Lint, Detekt and any other CheckStyle compatible XML reports as GitHub Actions annotations. Mostly targeting Gradle builds

JUnit's reports

junit

Checkstyle (and compatibles, like Detekt)s reports

checkstyle/detekt

Android Lint's reports

android lint

Detailed logs

logs

Summaries

Tests ✅ 5 passed 🟡 1 skipped ❌ 2 failed ⌛ took
✅ org.test.sample.AnotherTestSuite 4 0 0 0.578s
❌ org.test.sample.SampleTestSuite 1 1 2 0.002s
detekt 🛑 0 errors ⚠️ 1 warning 💡 0 others
NewLineAtEndOfFile 0 1 0
Android Lint 🛑 0 errors ⚠️ 1 warning 💡 0 others
Correctness / GradleDependency 0 1 0

Usage

On your workflow file add:

steps:
  - name: Run Gradle build
    run: ./gradlew build # this is an example
  - name: Report build results
    uses: gmazzo/publish-report-annotations@v1 # target latest version

Configuration

option usage default
token The GitHub token to use to create a check (with checks: write permission).
Only required if checkName is also set
github.token
checkName The name of the check to create.
If not set, no check will be created and annotations will be reported to the workflow run
None (reports to workflow run)
reports A multiple line list of globs pattern to look for reports **/build/test-results/**/TEST-*.xml
**/build/reports/checkstyle/*.xml
**/build/reports/lint-results-*.xml
**/build/reports/detekt/*.xml
summary The kind of summary to report into the check, options:
  • detailed prints all information available (may reach the GitHub's limit on large builds)
  • totals only prints aggregated totals
  • off Does not prints any summary
  • detailed
    warningsAsErrors If any warning is reported should count as an error. Mostly used in conjunction with failOnError false
    failOnError If the action should fail if any error is reported false

    Outputs

    The action will output the number of errors and warnings found in the reports, aggregated by tests, checks and totals:

    output description example
    tests The totals of tests
    { "count": 8, "passed": 4, "errors": 0, "skipped": 2, "failed": 2 }
    checks The totals of checks
    { "count": 12, "errors": 6, "warnings": 4, "others": 2 }
    total The aggregated totals
    { "errors": 20, "warnings": 8, "others": 12 }