Go to file
dependabot[bot] 6efd3d10b5
Bump nock from 13.3.1 to 13.3.2 (#173)
Bumps [nock](https://github.com/nock/nock) from 13.3.1 to 13.3.2.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.3.1...v13.3.2)

---
updated-dependencies:
- dependency-name: nock
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 13:06:08 +02:00
.github Bump actions/setup-go from 3 to 4 (#152) 2023-04-04 09:23:15 +02:00
custom_reports Fix filename and line for tests with suffix (#54) 2021-03-24 12:11:31 +01:00
dist Bump @octokit/plugin-retry from 4.1.6 to 6.0.0 (#168) 2023-07-19 09:55:28 +02:00
go chore: support go-junit-report (#111) 2022-12-28 07:58:33 +01:00
python Support for junit xml / pytest (#7) 2020-07-09 22:27:15 +02:00
tests Use package to determine path (#61) 2023-02-27 14:42:10 +01:00
.eslintignore road to v1 2020-05-19 15:00:21 +02:00
.eslintrc.json Revert libxml (#147) 2023-03-13 12:59:42 +01:00
.gitignore Support for junit xml / pytest (#7) 2020-07-09 22:27:15 +02:00
.prettierignore road to v1 2020-05-19 15:00:21 +02:00
.prettierrc.json road to v1 2020-05-19 15:00:21 +02:00
LICENSE road to v1 2020-05-19 15:00:21 +02:00
README.md fix: mention required permissions in documentation (#155) 2023-04-17 17:24:35 +02:00
action.js feat: Add support for Github Enterprise (#126) 2023-02-16 18:51:04 +01:00
action.test.fixtures.js Revert libxml (#147) 2023-03-13 12:59:42 +01:00
action.test.js Use package to determine path (#61) 2023-02-27 14:42:10 +01:00
action.yml Revert libxml (#147) 2023-03-13 12:59:42 +01:00
index.js road to v1 2020-05-19 15:00:21 +02:00
package-lock.json Bump nock from 13.3.1 to 13.3.2 (#173) 2023-07-19 13:06:08 +02:00
package.json Bump nock from 13.3.1 to 13.3.2 (#173) 2023-07-19 13:06:08 +02:00
screenshot.png road to v1 2020-05-19 15:00:21 +02:00
utils.js fix: fall back to test case name if message is empty (#164) 2023-07-18 17:30:14 +02:00
utils.test.js Revert libxml (#147) 2023-03-13 12:59:42 +01:00

README.md

GitHub Action: Process maven surefire reports

This action processes maven surefire or failsafe XML reports on pull requests and shows the result as a PR check with summary and annotations.

Screenshot

Inputs

report_paths

Optional. Glob expression to surefire or failsafe report paths. The default is **/surefire-reports/TEST-*.xml.

create_check

Optional. Set to false to add annotations to the current job where this action is being executed. The default is true.

check_name

Optional. Check name to use when creating a check run. The default is Test Report.

commit

Optional. The commit sha to update the status. This is useful when you run it with workflow_run.

fail_on_test_failures

Optional. Check will fail if there are test failures. The default is false.

fail_if_no_tests

Optional. Check will fail if no tests were found. The default is true.

skip_publishing

Optional. Skip the test report publishing (check run creation). The default is false.

github_token

Optional. Usually in form of github_token: ${{ secrets.GITHUB_TOKEN }}. The default is ${{ github.token }}.

file_name_in_stack_trace

Optional. Set to true to get the file name from the stack trace. The default is false.

github_base_url

Optional: If you use GitHub Enterprise, you can set this to the URL of your server (e.g. https://github.myorg.com/api/v3).

Example usage

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@v1
      - 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

Tips for Gradle

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
  }
}