1.13.0 • Published 3 months ago

@check-run-reporter/cli v1.13.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Check Run Reporter CI Integrations (check-run-reporter/integrations)

standard-readme compliant

Check Run Reporter's client library, CLI, and CI integrations.

This is a monorepo (sort of) for Check Run Reporter's client library, CLI, and CI integrations. Instead of maintaining separate test suites (if any tests at all) for each plugin, this repo contains the core TypeScript code as well as CI plugin integration code. As part of the build and release process, each plugin is pushed to the appropriate repository for consumption.

Install

For the various CI integrations, check the READMEs in their respective repos.

For the CLI, download the latest releas. Binaries are available for Linux, macOS, and Windows.

Usage

For the various CI integrations, check the READMEs in their respective repos.

For the CLI, get the most up-to-date documentation by running crr --help.

Examples

Upload test reports produced by jest-junit

JEST_JUNIT_OUTPUT_DIR='reports/junit' \
JEST_JUNIT_ANCESTOR_SEPARATOR=' › ' \
JEST_JUNIT_CLASSNAME='{classname}' \
JEST_JUNIT_INCLUDE_CONSOLE_OUTPUT=true \
JEST_JUNIT_OUTPUT_NAME='jest.xml' \
JEST_JUNIT_SUITE_NAME='Some Label' \
JEST_JUNIT_TITLE='{title}' \
jest --ci --reporters=jest-junit

crr submit \
  --label='Some Label' \
  --report='reports/junit/**/*.xml' \
  --token='<your token>' \
  --sha="$(git rev-parse HEAD)"

Distribute tests across multiple test runners

If you're on the Persistent plan, you can use Check Run Reporter to efficiently distribute your tests across multiple test runners.

crr split prints the names of all the test files that should be run by this node. Specify the --nodeCount and --nodeIndex options to tell Check Run Reporter how many nodes there are and which node this is. Use the --tests option to identify all candidate test files. Any tests that Check Run Reporter has seen before will be evenly distributed while new test will be spread round-robin.

JEST_JUNIT_OUTPUT_DIR='reports/junit' \
JEST_JUNIT_ANCESTOR_SEPARATOR=' › ' \
JEST_JUNIT_CLASSNAME='{classname}' \
JEST_JUNIT_INCLUDE_CONSOLE_OUTPUT=true \
JEST_JUNIT_OUTPUT_NAME='jest.xml' \
JEST_JUNIT_SUITE_NAME='Some Label' \
JEST_JUNIT_TITLE='{title}' \

npx jest $(crr split \
  --label='Unit Tests' \
  --nodeCount=3 \
  --nodeIndex=1 \
  --tests='src/**/*.spec.ts' \
  --token=$CHECK_RUN_REPORTER_TOKEN)

crr submit \
  --label='Some Label' \
  --nodeCount=3 \
  --nodeIndex=1 \
  --report='reports/junit/**/*.xml' \
  --token='<your token>' \
  --sha="$(git rev-parse HEAD)"

Maintainers

Ian Remmel

Contributing

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

License

MIT © Ian Remmel, LLC 2019-2021

1.13.0

3 months ago

1.12.0

12 months ago

1.11.2

1 year ago

1.10.3

2 years ago

1.11.1

2 years ago

1.10.2

2 years ago

1.9.1

2 years ago

1.9.0

2 years ago

1.8.0

2 years ago

1.11.0

2 years ago

1.10.1

2 years ago

1.10.0

2 years ago

1.7.2

2 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.4.0

3 years ago

1.2.0

3 years ago

1.3.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago