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.
Quick start
Section titled “Quick start”Add to your workflow after the test step:
- uses: jagreehal/executable-stories-action@v1That’s it. The action auto-detects your test output.
How it works
Section titled “How it works”The action checks for test output in two places:
-
Pre-generated reports — If
reports/test-results.htmlandreports/test-results.mdexist (the default output from JS/TS framework reporters), the action uses them directly. -
Raw run JSON — If
.executable-stories/raw-run.jsonexists (the default output from non-JS adapters like pytest, Go, Rust, JUnit5, xUnit), the action downloads theexecutable-storiesCLI binary and generates the reports.
Examples
Section titled “Examples”Vitest / Jest / Playwright
Section titled “Vitest / Jest / Playwright”Your framework reporter already generates HTML and Markdown:
name: CIon: [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@v1Python (pytest)
Section titled “Python (pytest)”name: CIon: [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@v1name: CIon: [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@v1Custom output paths
Section titled “Custom output paths”If you configured your reporter with custom outputDir or outputName:
- uses: jagreehal/executable-stories-action@v1 with: report-dir: docs/stories output-name: user-storiesPinned formatter version
Section titled “Pinned formatter version” - uses: jagreehal/executable-stories-action@v1 with: formatter-version: "0.7.3"Inputs
Section titled “Inputs”| Input | Default | Description |
|---|---|---|
report-dir | reports | Directory containing or receiving generated reports |
output-name | test-results | Base filename for reports (without extension) |
raw-run | .executable-stories/raw-run.json | Path to raw run JSON |
formatter-version | latest | Version of executable-stories binary (latest or semver) |
artifact-name | executable-stories-report | Name for the uploaded GitHub artifact |
comment-title | Executable Stories | Header text for the PR comment |
Outputs
Section titled “Outputs”| Output | Description |
|---|---|
html-report-path | Path to the HTML report file |
markdown-report-path | Path to the Markdown report file |
comment-id | ID of the created or updated PR comment |
Permissions
Section titled “Permissions”The workflow needs pull-requests: write to post comments:
permissions: pull-requests: writeWhat you see in PRs
Section titled “What you see in PRs”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).
Supported frameworks
Section titled “Supported frameworks”| Framework | Output type | Config needed |
|---|---|---|
| Vitest | HTML + Markdown (via StoryReporter) | None |
| Jest | HTML + Markdown (via reporter) | None |
| Playwright | HTML + Markdown (via reporter) | None |
| Cypress | HTML + Markdown (via reporter) | None |
| pytest | Raw JSON | None |
| Go | Raw JSON | None |
| Rust | Raw JSON | None |
| JUnit5 (Kotlin) | Raw JSON | None |
| xUnit (C#) | Raw JSON | None |