Giter Club home page Giter Club logo

action-xunit-viewer's Introduction

XUnit Viewer Github Action

XUnit / JUnit HTML Test Reports

Uses XUnit Viewer to generate reports in Github Action Workflows.

Usage

See Workflow Example for tests and workflow examples and the corresponding Action Run.


Release


Note: if:always() is needed to ensure test results are published when test runners return a failing exit code.

Default Use

Assumes your test reports exist in a folder named test-reports and generates the report at test-reports/index.html.

This test will report a failure if any of the tests failed or errored. fail=false will disable.

name: Test
on: push
jobs:
  test:
    runs-on: ubuntu-18.04
    name: Generate Test Reports
    steps:
      - name: XUnit Viewer
        id: xunit-viewer
        uses: AutoModality/action-xunit-viewer@v1  
      - name: Attach the report
        uses: actions/upload-artifact@v1
        with:
          name: ${{ steps.xunit-viewer.outputs.report-name }}
          path: ${{ steps.xunit-viewer.outputs.report-dir }}

Provide Report Path

Provide an alternate path to the directory where the xml results exist. The report will be generated in the directory where the results are found.

name: Test
on: push
jobs:
  test:
    runs-on: ubuntu-18.04
    name: Generate Test Reports
    env:
      RESULTS_PATH: alternate-location
    steps:
      - name: Generate Report
        id: xunit-viewer
        uses: AutoModality/action-xunit-viewer@v1
        with:
          results: ${{ env.RESULTS_PATH }}
      - name: The generated report
        run: echo "The report is ${{ steps.xunit-viewer.outputs.report-file }}"    
      - name: Attach the report
        uses: actions/upload-artifact@v1
        with:
          name: alternate-results-path-reports
          path: ${{ env.RESULTS_PATH }}

action-xunit-viewer's People

Contributors

aroller 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.