MCPcopy Index your code
hub / github.com/SonicGarden/rspec-report-action

github.com/SonicGarden/rspec-report-action @v8.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v8.0.0 ↗ · + Follow
24 symbols 77 edges 14 files 0 documented · 0%

Browse by type

Functions 21 Types & classes 3
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

RSpec Report

A GitHub Action that report RSpec failure.

Usage:

Reported in Job Summary (and as a pull request comment when comment is enabled).

The report lists every failed example up front in a single code block (spec/foo_spec.rb:37 description), so you can grasp the failures at a glance and copy them easily. All failures are then collected into a single Details block, each with a linked heading, the original failure message (kept as-is) and, when available, the project-local backtrace lines (gem / Ruby internals are excluded; omitted when none are found). Up to 20 examples are listed; any remainder is summarized as ... and N more failures.

Demo

Inputs

See action.yml

Name Description Default Required
json-path Path to RSpec result json file. (Support for glob pattern) yes
token GITHUB_TOKEN ${{ github.token }} no
title Summary title # :cold_sweat: RSpec failure no
hideFooterLink Hide footer link false no
comment Set this if want to comment report to pull request true no

Example

name: Build
on:
  pull_request:

jobs:
  rspec:
    steps:
      # setup...

      - name: Test
        run: bundle exec rspec -f j -o tmp/rspec_results.json -f p

      - name: RSpec Report
        uses: SonicGarden/rspec-report-action@v7
        with:
          json-path: tmp/rspec_results.json
        if: always()

Parallel Test Example

name: Build
on:
  pull_request:

jobs:
  rspec:
    strategy:
      fail-fast: false
      matrix:
        ci_node_index: [0, 1]
        ci_node_total: [2]
    steps:
      # setup...

      # Recommend using `r7kamura/split-tests-by-timings`.
      - id: split-tests
        run: |
          PATHS=$(
            find spec -type f -name '*_spec.rb' | \
              xargs wc -l | \
              head -n -1 | \
              sort -n | \
              awk -v node=${{ matrix.ci_node_index }} -v total=${{ matrix.ci_node_total }} 'NR % total == node {print $2}' | \
              tr '\n' ' '
          )
          echo "paths=$PATHS" >> "$GITHUB_OUTPUT"
        shell: bash

      - name: Test
        run: |
          bundle exec rspec \
            -f j -o tmp/json-reports/rspec_results-${{ matrix.ci_node_index }}.json \
            -f p \
            ${{ steps.split-tests.outputs.paths }}
      - uses: actions/upload-artifact@v4
        with:
          if-no-files-found: error
          name: json-reports-${{ matrix.ci_node_index }}
          path: tmp/json-reports
        if: always()

  report-rspec:
    needs: rspec
    if: always()
    steps:
      - name: Download all rspec results
        uses: actions/download-artifact@v4
        with:
          pattern: json-reports-*
          path: /tmp/json-reports
          merge-multiple: true
      - name: RSpec Report
        uses: SonicGarden/rspec-report-action@v7
        with:
          json-path: /tmp/json-reports/rspec_results-*.json

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 21
Interface 3

Languages

TypeScript100%

Modules by API surface

src/parse.ts7 symbols
src/format.ts7 symbols
src/profile-comment.ts4 symbols
src/report-comment.ts2 symbols
src/util.ts1 symbols
src/report-summary.ts1 symbols
src/main.ts1 symbols
__tests__/format.test.ts1 symbols

For agents

$ claude mcp add rspec-report-action \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page