GitHub Action
Check Run Reporter
A GitHub action for uploading structured test reports to check-run-reporter.com.
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.
Since we're using inputs instead of environment variables, you'll need to
- Use
with
instead ofenv
to configure this action. - Remove the
CHECK_RUN_REPORTER_
prefix. - Make the variables lowerase.
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/action@v2.13.1
# 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.
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.
MIT © Ian Remmel, LLC 2019-202