pytest-github-actions-annotate-failures
pytest plugin to annotate failed tests with a workflow command for GitHub Actions
What it is and what it does
This is a pytest plugin designed to integrate test results directly into GitHub Actions workflows. When tests fail, it uses GitHub Actions workflow commands to create annotations that appear in the Actions UI, pull request checks, and job summaries, making failures immediately visible without requiring developers to dig through logs.
The plugin works by hooking into pytest's test execution and capturing failures, then emitting GitHub workflow annotation commands that the Actions runner interprets. It requires only pytest as a runtime dependency and has low install friction. It supports warning annotations when used with Pytest 6.0 or later, and can be disabled with a command-line flag if needed. For Docker-based test runs or tests in repository subdirectories, environment variables must be configured to ensure GitHub correctly maps reported failures to source files.
Use it for:
- Automatically surface test failures in GitHub Actions job summaries and PR checks without manual log parsing
- Integrate pytest test results into GitHub's native CI/CD UI for faster failure identification
- Annotate both test failures and warnings in GitHub Actions workflows with a single plugin install
- Run tests in Docker containers within GitHub Actions while preserving failure annotations via environment variable configuration
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A pytest plugin that automatically annotates failed tests in GitHub Actions workflows using GitHub's workflow annotation commands, making test failures visible directly in the Actions UI.
Yes. This plugin is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and solves a real workflow problem—making test failures visible in GitHub Actions without extra configuration. Install it if you run pytest in GitHub Actions and want failures to surface directly in the UI.
Install
pytest-github-actions-annotate-failures on PyPI
pip
pip install pytest-github-actions-annotate-failuresuv
uv add pytest-github-actions-annotate-failurespoetry
poetry add pytest-github-actions-annotate-failuresInstalling pytest-github-actions-annotate-failures
Before you install
Low install friction with a single runtime dependency on pytest. Actively maintained with a recent release; last commit on 2026-08-13 and marked as Production/Stable.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it straightforward to integrate into any project.
Quickstart
pip install pytest-github-actions-annotate-failures
pytest
# In GitHub Actions workflow:
- run: pytest
Requires Python 3.10 or later. When running tests in Docker, the GITHUB_ACTIONS environment variable must be manually set to true. If tests run from a subdirectory, PYTEST_RUN_PATH must be set to the relative path for correct file identification.
Verify before relying
- Whether warning annotations (available with Pytest 6.0+) work correctly with all current pytest versions
- Performance impact when handling large numbers of test failures in a single run
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pytest |
| Maintenance | actively maintained — 56 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,672,515/month — #2,531 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pytest_github_actions_annotate_failures-0.4.2-py3-none-any.whl
Keywords: plugin, pytest, testing
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytest-progressA pytest plugin that displays real-time test…
permissive · top 15,000 on PyPI
github-action-utilsProvides Python functions to invoke GitHub…
permissive · top 5,000 on PyPI
lightning-utilitiesProvides reusable GitHub workflows, composite…
permissive · top 5,000 on PyPI
pytest-retrypytest-retry is a pytest plugin that…
permissive · top 5,000 on PyPI
pytest-instafailA pytest plugin that displays test failures and…
permissive · top 5,000 on PyPI
pytest-checkA pytest plugin that allows tests to continue…
unclear · top 5,000 on PyPI
tox-gh-actionsA tox plugin that automatically detects and…
permissive · top 15,000 on PyPI
actionlint-pyactionlint-py provides a pip-installable…
permissive · top 15,000 on PyPI
pytest-md-reportA pytest plugin that generates test outcome…
permissive · top 15,000 on PyPI
tox-ghtox-gh automatically selects and runs the…
permissive · top 15,000 on PyPI