Go to file
Juraj Misur a915ba6359
Fix filename and line for tests with suffix (#54)
2021-03-24 12:11:31 +01:00
.github/workflows Fix filename and line for tests with suffix (#54) 2021-03-24 12:11:31 +01:00
custom_reports Fix filename and line for tests with suffix (#54) 2021-03-24 12:11:31 +01:00
dist Fix filename and line for tests with suffix (#54) 2021-03-24 12:11:31 +01:00
python Support for junit xml / pytest (#7) 2020-07-09 22:27:15 +02:00
tests Bump junit from 4.13 to 4.13.1 in /tests (#32) 2020-10-15 13:38:24 +02:00
.eslintignore road to v1 2020-05-19 15:00:21 +02:00
.eslintrc.json road to v1 2020-05-19 15:00:21 +02: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 don't require manually passing in the github token (#52) 2021-03-24 09:05:21 +01:00
action.js fail_if_no_tests flag (#35) 2020-10-15 23:21:14 +02:00
action.test.fixtures.js fail_if_no_tests flag (#35) 2020-10-15 23:21:14 +02:00
action.test.js fail_if_no_tests flag (#35) 2020-10-15 23:21:14 +02:00
action.yml don't require manually passing in the github token (#52) 2021-03-24 09:05:21 +01:00
index.js road to v1 2020-05-19 15:00:21 +02:00
package-lock.json fix package-lock.json (#44) 2021-02-04 10:30:01 +01:00
package.json dependency updates (#40) 2021-01-19 12:09:50 +01:00
screenshot.png road to v1 2020-05-19 15:00:21 +02:00
utils.js Fix filename and line for tests with suffix (#54) 2021-03-24 12:11:31 +01:00
utils.test.js Fix filename and line for tests with suffix (#54) 2021-03-24 12:11:31 +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.

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.

github_token

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

Example usage

name: build
on:
  pull_request:

jobs:
  build:
    name: Build and Run Tests
    runs-on: ubuntu-latest
    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: ${{ always() }}
        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
  }
}