Skip to content

test-reporter

test-reporter #820

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
jobs:
report:
runs-on: ubuntu-latest
steps:
- uses: elastic/apm-pipeline-library/.github/actions/test-report@current
with:
artifact: test-results # artifact name
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:
- name: Download artifacts
run: >
gh run download ${{ github.event.workflow_run.id }}
--name test-results
--repo "${GITHUB_REPOSITORY}"
--dir .
env:
GH_TOKEN: ${{ github.token }}
- uses: 5monkeys/cobertura-action@4157521550018abbbd29dfdf1b5963e907ea37f0
with:
path: "**/coverage.xml"
skip_covered: false
minimum_coverage: 100
fail_below_threshold: true
show_line: true
show_branch: true
show_missing: true