Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-github-actions-reporter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-github-actions-reporter

Reporter for Jest that outputs GitHub Actions annotations

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Jest Reporter for GitHub Actions

A custom Jest reporter to create annotations when run via GitHub Actions.

Usage

All you have to do to get annotations in your GitHub Actions runs is to add the reporter your Jest configuration.

  1. Install npm install -D jest-github-actions-reporter
  2. Add to your jest.config.js:
module.exports = {
  reporters: [
    "default",
    "jest-github-actions-reporter"
  ],
  testLocationInResults: true
};

alternatively you can only add it during your CI build, for example in package.json:

{
    ...
    "scripts": {
        "citest": "CI=true jest --reporters=default --reporters=jest-github-actions-reporter"
    }
}

nothing else is required, no token sharing, no REST API calls etc.

Example

.github/workflows/CI.yaml

name: CI

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x]

    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm ci
    - run: npm run build --if-present
    - run: npm citest
      env:
        CI: true

How does this work?

GitHub Actions supports a number of commands that allow you to provide rich experiences without custom REST API calls etc. See the docs for more information.

FAQs

Package last updated on 07 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc