Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/currents-dev/currents-jest-github-actions-example

Report Jest test results to Currents - a cloud platform for debugging, troubleshooting and analysing CI tests
https://github.com/currents-dev/currents-jest-github-actions-example

cicd currents jest jest-reporter jest-shards test-automation

Last synced: 21 days ago
JSON representation

Report Jest test results to Currents - a cloud platform for debugging, troubleshooting and analysing CI tests

Awesome Lists containing this project

README

        

# Currents + Jest on GitHub Actions Example

## About

This repository demonstrates how to report test results generated by Jest to [Currents](https://currents.dev) - a cloud platform for debugging, troubleshooting and analysing CI tests.

This example runs Jest tests in [parallel](https://jestjs.io/docs/cli#--shard) using GitHub actions matrix with 2 containers.

## How to reproduce

Follow the steps to reproduce this example:

- Create an account at https://app.currents.dev and obtain Project Id and Record Key
- Save the Record Key as [Repository Secret](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions) `CURRENTS_RECORD_KEY`
- Add `@currents/cmd` and `@currents/jest` as a dependency
- Add `@currents/jest` as Jest reporter (see `./jest.config.js`)
- Configure GitHub actions [workflow](.github/workflows/test.yml):
- run the tests: `npm run test`
- upload the test results to Currents: `npx currents upload ...`

## Resources

- 📖 [Currents documentation](https://docs.currents.dev)
- [`@currents/cmd`](https://docs.currents.dev/resources/reporters/currents-cmd)
- [`@currents/jest`](https://docs.currents.dev/resources/reporters/currents-jest)