GithubHelp home page GithubHelp logo

isabella232 / action-junit-report Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siteimprove/action-junit-report

0.0 0.0 0.0 2.24 MB

Reports junit test results as GitHub Pull Request Check

License: Apache License 2.0

TypeScript 70.41% JavaScript 0.72% Python 0.90% Java 24.38% Kotlin 3.59%

action-junit-report's Introduction

:octocat:

action-junit-report

... reports JUnit test results as GitHub pull request check.



What's included ๐Ÿš€ โ€ข Setup ๐Ÿ› ๏ธ โ€ข Sample ๐Ÿ–ฅ๏ธ โ€ข Contribute ๐Ÿงฌ โ€ข License ๐Ÿ““


What's included ๐Ÿš€

  • Flexible JUnit parser with wide support
  • Supports nested test suites
  • Blazingly fast execution
  • Lighweight
  • Rich build log output

This action processes JUnit XML test reports on pull requests and shows the result as a PR check with summary and annotations.

Based on action for Surefire Reports by ScaCap

Setup

Configure the workflow

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: # execute your tests generating test results
      - name: Publish Test Report
        uses: mikepenz/action-junit-report@v2
        with:
          report_paths: '**/build/test-results/test/TEST-*.xml'
          github_token: ${{ secrets.GITHUB_TOKEN }}

Inputs

Input Description
github_token Required. Usually in form of github_token: ${{ secrets.GITHUB_TOKEN }}.
report_paths Required. Glob expression to junit report paths. The default is **/junit-reports/TEST-*.xml.
check_name Optional. Check name to use when creating a check run. The default is Test Report.
suite_regex Optional. Regular expression for the named test suites. E.g. Test*
commit Optional. The commit SHA to update the status. This is useful when you run it with workflow_run.
fail_on_failure Optional. Fail the build in case of a test failure.
require_tests Optional. Fail if no test are found..

Sample ๐Ÿ–ฅ๏ธ

Contribute ๐Ÿงฌ

# Install the dependencies  
$ npm install

# Build the typescript and package it for distribution
$ npm run build && npm run package

# Run the tests, use to debug, and test it out
$ npm test

# Verify lint is happy
$ npm run lint -- --fix

Credits

Original idea and GitHub Actions by: https://github.com/ScaCap/action-surefire-report

Other actions

License

Copyright (C) 2021 Mike Penz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

action-junit-report's People

Contributors

dependabot[bot] avatar mikepenz 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.