[!WARNING]
ScaCap/action-surefire-report@v1is fully deprecated and is no longer supported. It will receive no further updates or fixes. UseScalableCapital/action-surefire-report@v2instead.
Replace:
uses: ScaCap/action-surefire-report@v1
With:
uses: ScalableCapital/action-surefire-report@v2
The active release line, documentation, and ongoing maintenance live in the ScalableCapital repository.
This action processes maven surefire or failsafe XML reports on pull requests and shows the result as a PR check with summary and annotations.

report_pathsOptional. Glob expression to surefire or failsafe report paths. The default is **/surefire-reports/TEST-*.xml.
create_checkOptional. Set to false to add annotations to the current job where this action is being executed. The default is true.
check_nameOptional. Check name to use when creating a check run. The default is Test Report.
commitOptional. The commit sha to update the status. This is useful when you run it with workflow_run.
fail_on_test_failuresOptional. Check will fail if there are test failures. The default is false.
fail_if_no_testsOptional. Check will fail if no tests were found. The default is true.
ignore_flaky_testsOptional. Set to true to consider flaky tests as success. The default is false.
skip_publishingOptional. Skip the test report publishing (check run creation). The default is false.
github_tokenOptional. Usually in form of github_token: ${{ secrets.GITHUB_TOKEN }}. The default is ${{ github.token }}.
file_name_in_stack_traceOptional. Set to true to get the file name from the stack trace. The default is false.
github_base_urlOptional: If you use GitHub Enterprise, you can set this to the URL of your server (e.g. https://github.myorg.com/api/v3).
custom_summaryOptional: Custom summary text to display in the workflow run output. Useful when generating reports in a separate workflow and linking back to the original test execution. Markdown is supported.
name: build
on:
pull_request:
jobs:
build:
name: Build and Run Tests
runs-on: ubuntu-latest
# Permissions block is optional, useful for dependabot checks
permissions:
checks: write
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build and Run Tests
run: mvn test --batch-mode --fail-at-end
- name: Publish Test Report
if: success() || failure()
uses: scacap/action-surefire-report@v1
As Gradle uses a different build directory than Maven by default, you might need to set the report_paths variable:
report_paths: '**/build/test-results/test/TEST-*.xml'
You also need to enable JUnit XML reports as shown below.
test {
reports {
junitXml.enabled = true
}
}
JavaScript
82.9%
Java
14.3%
Kotlin
1.8%
[!WARNING]
ScaCap/action-surefire-report@v1is fully deprecated and is no longer supported. It will receive no further updates or fixes. UseScalableCapital/action-surefire-report@v2instead.
Replace:
uses: ScaCap/action-surefire-report@v1
With:
uses: ScalableCapital/action-surefire-report@v2
The active release line, documentation, and ongoing maintenance live in the ScalableCapital repository.
This action processes maven surefire or failsafe XML reports on pull requests and shows the result as a PR check with summary and annotations.

report_pathsOptional. Glob expression to surefire or failsafe report paths. The default is **/surefire-reports/TEST-*.xml.
create_checkOptional. Set to false to add annotations to the current job where this action is being executed. The default is true.
check_nameOptional. Check name to use when creating a check run. The default is Test Report.
commitOptional. The commit sha to update the status. This is useful when you run it with workflow_run.
fail_on_test_failuresOptional. Check will fail if there are test failures. The default is false.
fail_if_no_testsOptional. Check will fail if no tests were found. The default is true.
ignore_flaky_testsOptional. Set to true to consider flaky tests as success. The default is false.
skip_publishingOptional. Skip the test report publishing (check run creation). The default is false.
github_tokenOptional. Usually in form of github_token: ${{ secrets.GITHUB_TOKEN }}. The default is ${{ github.token }}.
file_name_in_stack_traceOptional. Set to true to get the file name from the stack trace. The default is false.
github_base_urlOptional: If you use GitHub Enterprise, you can set this to the URL of your server (e.g. https://github.myorg.com/api/v3).
custom_summaryOptional: Custom summary text to display in the workflow run output. Useful when generating reports in a separate workflow and linking back to the original test execution. Markdown is supported.
name: build
on:
pull_request:
jobs:
build:
name: Build and Run Tests
runs-on: ubuntu-latest
# Permissions block is optional, useful for dependabot checks
permissions:
checks: write
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Build and Run Tests
run: mvn test --batch-mode --fail-at-end
- name: Publish Test Report
if: success() || failure()
uses: scacap/action-surefire-report@v1
As Gradle uses a different build directory than Maven by default, you might need to set the report_paths variable:
report_paths: '**/build/test-results/test/TEST-*.xml'
You also need to enable JUnit XML reports as shown below.
test {
reports {
junitXml.enabled = true
}
}
JavaScript
82.9%
Java
14.3%
Kotlin
1.8%