Giter Site home page Giter Site logo

sportalliance / action-surefire-report Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scacap/action-surefire-report

0.0 0.0 0.0 2.26 MB

Reports surefire test results as GitHub Pull Request Check

License: Apache License 2.0

JavaScript 82.61% Python 0.48% Java 14.51% Kotlin 1.91% Go 0.49%

action-surefire-report's Introduction

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

action-surefire-report's People

Contributors

dependabot[bot] avatar jmisur avatar ghaiszaher avatar nineinchnick avatar yeikel avatar hyukjinkwon avatar renatoabreu11 avatar justanotherdev avatar quietbird avatar renatoathaydes avatar scalable-atlantis[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.