Skip to content

test-reporter

test-reporter #1016

Workflow file for this run

---
## Workflow to process the JUnit test results and add a report to the checks.
name: test-reporter
on:
workflow_run:
workflows:
- test
types:
- completed
permissions:
contents: read
actions: read
checks: write
pull-requests: write
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: elastic/oblt-actions/test-report@v1
with:
artifact: /test-results(.*)/ # artifact name pattern
name: JUnit Tests # Name of the check run which will be created
path: "**/elastic-serverless-forwarder-junit.xml" # Path to test results (inside artifact .zip)
reporter: java-junit # Format of test results
output-to: step-summary # Write summary in the PR
coverage:
if: ${{ github.event.workflow_run.event == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: test-results*
merge-multiple: true
run-id: ${{ github.event.workflow_run.id }}
- uses: 5monkeys/cobertura-action@ee5787cc56634acddedc51f21c7947985531e6eb
with:
path: "**/coverage.xml"
skip_covered: false
minimum_coverage: 100
fail_below_threshold: true
show_line: true
show_branch: true
show_missing: true