Skip to content

GitHub Action

The executable-stories-action posts your story output directly into pull requests. Each PR gets a collapsible Markdown summary as a comment and the full HTML report as a downloadable artifact.

Works with all supported frameworks. Zero configuration for the common case.

Add to your workflow after the test step:

- uses: jagreehal/executable-stories-action@v1

That’s it. The action auto-detects your test output.

The action checks for test output in two places:

  1. Pre-generated reports — If reports/test-results.html and reports/test-results.md exist (the default output from JS/TS framework reporters), the action uses them directly.

  2. Raw run JSON — If .executable-stories/raw-run.json exists (the default output from non-JS adapters like pytest, Go, Rust, JUnit5, xUnit), the action downloads the executable-stories CLI binary and generates the reports.

Your framework reporter already generates HTML and Markdown:

name: CI
on: [pull_request]
permissions:
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: pnpm install
- run: pnpm test
- uses: jagreehal/executable-stories-action@v1
name: CI
on: [pull_request]
permissions:
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -e ".[test]"
- run: pytest
- uses: jagreehal/executable-stories-action@v1
name: CI
on: [pull_request]
permissions:
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- run: go test ./...
- uses: jagreehal/executable-stories-action@v1

If you configured your reporter with custom outputDir or outputName:

- uses: jagreehal/executable-stories-action@v1
with:
report-dir: docs/stories
output-name: user-stories
- uses: jagreehal/executable-stories-action@v1
with:
formatter-version: "0.7.3"
InputDefaultDescription
report-dirreportsDirectory containing or receiving generated reports
output-nametest-resultsBase filename for reports (without extension)
raw-run.executable-stories/raw-run.jsonPath to raw run JSON
formatter-versionlatestVersion of executable-stories binary (latest or semver)
artifact-nameexecutable-stories-reportName for the uploaded GitHub artifact
comment-titleExecutable StoriesHeader text for the PR comment
OutputDescription
html-report-pathPath to the HTML report file
markdown-report-pathPath to the Markdown report file
comment-idID of the created or updated PR comment

The workflow needs pull-requests: write to post comments:

permissions:
pull-requests: write

The action creates a comment on your PR with:

  • A collapsible section containing the full Markdown story output
  • A link to download the interactive HTML report from the workflow artifacts

On subsequent pushes, the comment is updated (not duplicated).

FrameworkOutput typeConfig needed
VitestHTML + Markdown (via StoryReporter)None
JestHTML + Markdown (via reporter)None
PlaywrightHTML + Markdown (via reporter)None
CypressHTML + Markdown (via reporter)None
pytestRaw JSONNone
GoRaw JSONNone
RustRaw JSONNone
JUnit5 (Kotlin)Raw JSONNone
xUnit (C#)Raw JSONNone