Pytest Summary Specification
Index of artifacts in this directory.
Open source Repository Open in the app JSON README (API)
About
# Pytest Summary Specification
## Contents
* [Spec](./spec.md)
Details
- Kind
- OKF bundles
- Topic
- Developer tools
- Publisher
- agent-ix
- Origin
- okf_github
- Category
- dados
- Version
- 0.1
- Last push
- 2026-06-20T01:22:08Z
- Repository state
- ativo
- Language
- Python
- License
- MIT
- Added
- 2026-09-08 02:17:33
- Updated
- 2026-09-08 02:17:33
- Origin id
agent-ix/pytest-summary:spec/index.md
README
# 🧪 Pytest Summary GitHub Action
This GitHub Action generates a detailed, collapsible summary of **failed tests** from a [`pytest-json-report`](https://github.com/pytest-dev/pytest-json-report) output file.
✅ Shows test results directly in the GitHub Actions summary
📦 Built for reuse in monorepos, shared workflows, and CI pipelines
---
## 📥 Inputs
| Name | Description | Required | Default |
|--------------|-----------------------------------|----------|----------------|
| `report-path` | Path to `pytest.json` file | No | `pytest.json` |
---
## 📤 Output
- If all tests pass:
`✅ All tests passed!`
- If there are failures:
Outputs a collapsible `<details>` section per failed test showing:
- Test ID
- Failure traceback (`longrepr`)
- Captured output (stdout/stderr)
Example:
<details>
<summary><code>tests/test_foo.py::test_bar</code></summary>
```text
Traceback (most recent call last):
...
AssertionError: expected 1 == 2
Captured output:
Running test...
```
<details>
🚀 Usage
```yaml
jobs:
summarize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Pytest
run: |
pip install pytest pytest-json-report
pytest --json-report --json-report-file=pytest.json
- name: Summarize pytest failures
uses: agent-ix/pytest-summary@v1
with:
report-path: pytest.json
```