Go to file
Jörg Henne 30a55e139a Fix fail_on_failure 2020-09-25 12:57:44 +02:00
.github/workflows fix branch 2020-07-09 22:28:50 +02:00
dist Fix fail_on_failure 2020-09-25 12:57:44 +02:00
python Support for junit xml / pytest (#7) 2020-07-09 22:27:15 +02:00
tests road to v1 2020-05-19 15:00:21 +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 Improve Gradle instructions. (#16) 2020-08-20 10:47:17 +02:00
action.js Fix fail_on_failure 2020-09-25 12:57:44 +02:00
action.test.fixtures.js fallback to sha if not on pr (#4) 2020-05-22 12:17:14 +02:00
action.test.js Fix fail_on_failure 2020-09-25 12:57:44 +02:00
action.yml Restore original indentation 2020-09-25 12:21:33 +02:00
index.js road to v1 2020-05-19 15:00:21 +02:00
package-lock.json Bump node-fetch from 2.6.0 to 2.6.1 (#20) 2020-09-14 10:13:01 +02:00
package.json road to v1 2020-05-19 15:00:21 +02:00
screenshot.png road to v1 2020-05-19 15:00:21 +02:00
utils.js Add support for input 'fail_on_failure' and output 'outcome' 2020-09-25 11:58:59 +02:00
utils.test.js Support for junit xml / pytest (#7) 2020-07-09 22:27:15 +02: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

github_token

Required. Usually in form of github_token: ${{ secrets.GITHUB_TOKEN }}.

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.

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 -Dmaven.test.failure.ignore=true
      - name: Publish Test Report
        uses: scacap/action-surefire-report@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

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