Coder Social home page Coder Social logo

michaelhinrichs / action Goto Github PK

View Code? Open in Web Editor NEW

This project forked from check-run-reporter/action

0.0 0.0 0.0 1.96 MB

A GitHub Action for uploading structured test reports to check-run-reporter.com

Home Page: https://www.check-run-reporter.com

License: MIT License

JavaScript 11.45% TypeScript 88.55%

action's Introduction

GitHub Actions for Check Run Reporter (check-run-reporter/action)

A GitHub action for uploading structured test reports to check-run-reporter.com.

V2

The first version of check-run-reporter/action was thrown together pretty early on as far as GitHub Action are concerned. All actions had to be written as Docker images. Windows support was difficult, if not impossible. Configuration was driven by environment variables. Workflows were configured with HCL instead of Yaml.

Times have changed. V2 is completely rewritten in TypeScript. Rather than doing everything with bash and curl, we now get the control flow of a modern language and we can rely on actions.yml to typecheck our configuration instead of just hoping environment variables have been set.

Breaking Change

Since we're using inputs instead of environment variables, you'll need to

  1. Use with instead of env to configure this action.
  2. Remove the CHECK_RUN_REPORTER_ prefix.
  3. Make the variables lowerase.

Usage

First, get your Check Run Reporter repo token from check-run-reporter.com and set it as a secret in your GitHub repo.

At a minimum, you must specify the report and token inputs in your workflow.

The example below shows how you might configure a JavaScript project to upload multiple JUnit reports.

on: push
name: Test
jobs:
    test:
        runs-on: ubuntu-latest
        steps:
            - uses: actions/checkout@master
            - uses: actions/setup-node@v1
              with:
                node-version: '12.x'
            - run: npm ci
            - run: npm test
            - uses: check-run-reporter/[email protected]
              # always run, otherwise you'll only see results for passing builds
              if: ${{ always() }}
              with:
                token: ${{ secrets.CHECK_RUN_REPORTER_TOKEN }}
                report: 'reports/junit/**/*.xml'

You can declare the action multiple times if you'd like to do separate submissions with different labels (for example, you want separate style report and test report submissions).

Note the if: ${{ always() }}. By default, GitHub actions exit as soon as a step fails. You'll need to tell GitHub to run even in event of failure to ensure your reports are submitted.

See action.yml for full configuration options.

Maintainers

Ian Remmel

Contributing

We welcome pull requests, but for anything more than a minor tweak, please create an issue for so we can discuss whether the change is the right direction for the project.

License

MIT © Ian Remmel, LLC 2019-202

action's People

Contributors

dependabot[bot] avatar ianwremmel avatar semantic-release-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.