# @reporters/github

> A github actions reporter for `node:test`

Latest version **2.1.4** (published 2026-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @reporters/github
pnpm add @reporters/github
yarn add @reporters/github
bun add @reporters/github
```

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 2.1.4 |
| Published | 2026-09-09 |
| First published | 2022-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 29.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 63 |
| Author | Moshe Atlow |
| Maintainers | molow |
| Keywords | github actions, node:test, test, reporter, reporters |

## Links

- npm: https://www.npmjs.com/package/@reporters/github
- Repository: https://github.com/MoLow/reporters.git
- Homepage: https://github.com/MoLow/reporters/tree/main/packages/github
- Issues: https://github.com/MoLow/reporters/issues
- npm.io page: https://npm.io/package/@reporters/github

## Dependencies (2)

- [stack-utils](https://npm.io/package/stack-utils.md) ^2.0.6
- [@actions/core](https://npm.io/package/@actions/core.md) ^3.0.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 2.1.4 (latest) — 2026-09-09
- 2.1.3 — 2026-08-30
- 2.1.2 — 2026-08-09
- 2.1.1 — 2026-08-03
- 2.1.0 — 2026-08-03
- 2.0.2 — 2026-07-02
- 2.0.1 — 2026-06-02
- 2.0.0 — 2026-05-24
- 1.13.1 — 2026-04-19
- 1.13.0 — 2026-04-16
- 1.12.0 — 2026-01-28
- 1.11.1 — 2026-01-28
- 1.11.0 — 2025-09-02
- 1.10.0 — 2025-08-26
- 1.9.3 — 2025-08-26
- … 24 more at https://npm.io/package/@reporters/github/versions

## README

[![npm version](https://img.shields.io/npm/v/@reporters/github)](https://www.npmjs.com/package/@reporters/github) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters)

# GitHub Actions Annotations Reporter

Adds GitHub Actions annotations (inline error annotations and diagnostics) and
a job summary to `node:test` — failures show up pinned to the exact line in the
PR diff, listed on the workflow run, and totaled in a summary table.

This reporter emits **only** GitHub Actions workflow commands — it produces no
human-readable test log of its own, so you pair it with another reporter (e.g.
`spec`) for the readable output. Outside GitHub Actions it emits nothing, which
means it's safe to leave in your test command everywhere: it stays completely
out of the way locally.

> **`github` vs [`gh`](https://www.npmjs.com/package/@reporters/gh)**
> - **`@reporters/github`** (this package) — annotations and summary **only**. Layer it on top of whatever reporter you already use; it stays out of the way locally (no output unless running in GitHub Actions).
> - **`@reporters/gh`** — all-in-one: bundles a readable spec-style log **with** the annotations and summary, so you only need a single `--test-reporter`.
>
> See the [full comparison in the main README](https://github.com/MoLow/reporters#github-actions-gh-vs-github).

## Installation

```bash
npm install --save-dev @reporters/github
```
or
```bash
yarn add --dev @reporters/github
```

## Usage

```yaml
# .github/workflows/test.yml
- name: Run tests
  run: node \
    --test-reporter=@reporters/github --test-reporter-destination=stdout \
    --test-reporter=spec --test-reporter-destination=stdout \
    --test
```

The second reporter (`spec` here, but any reporter works) provides the
human-readable log; `@reporters/github` adds the annotations and summary
alongside it. If you'd rather not juggle two reporters, use
[`@reporters/gh`](https://www.npmjs.com/package/@reporters/gh) instead.

## What it looks like

When a test fails, annotations appear in the GitHub UI with the corresponding
errors and diagnostics — see this [example run](https://github.com/MoLow/reporters/actions/runs/5607828636):

#### Inline annotations — failures pinned to the exact line in the PR diff

<img width="810" alt="Inline Annotation" src="https://user-images.githubusercontent.com/8221854/254798653-0c06278e-696b-42eb-8275-364b7eb3133b.png">

#### Annotations on the workflow run

<img width="810" alt="Annotation" src="https://user-images.githubusercontent.com/8221854/254798495-38c2a8ea-c9e0-4e87-a13e-677826b72192.png">

#### Job summary — pass/fail/skip counts and durations

<img width="815" alt="Summary" src="https://github.com/MoLow/reporters/assets/8221854/8934f5bb-3342-430c-9ae0-3c608a40c9f0">

---
_Source: https://npm.io/package/@reporters/github · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
