GitHub Action
Publish Reports
v1.3.4
Latest version
Reports JUnit, Android Lint, Detekt and any other CheckStyle compatible XML reports as GitHub Actions annotations. Mostly targeting Gradle builds
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 | 💡 0 others | |
---|---|---|---|
NewLineAtEndOfFile | 0 | 1 | 0 |
Android Lint | 🛑 0 errors | 💡 0 others | |
---|---|---|---|
Correctness / GradleDependency | 0 | 1 | 0 |
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
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 glob s 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 totalsoff 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 |
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 } |