Skip to main content

pytest-github-actions-annotate-failures

Pytest plugin to annotate failed tests with a workflow command for GitHub Actions

Usage

Just install and run pytest with this plugin in your workflow. For example,

name: test

on:
  push:

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4

    - uses: actions/setup-python@v5
      with:
        python-version: 3.13

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt

    - name: Install plugin
      run: pip install pytest-github-actions-annotate-failures

    - run: pytest

If your test is running in a Docker container, you have to install this plugin and manually set GITHUB_ACTIONS environment variable to true inside of Docker container. (For example, docker-compose run --rm -e GITHUB_ACTIONS=true app -- pytest)

If your tests are run from a subdirectory of the git repository, you have to set the PYTEST_RUN_PATH environment variable to the path of that directory relative to the repository root in order for GitHub to identify the files with errors correctly.

Warning annotations

This plugin also supports warning annotations when used with Pytest 6.0+. To disable warning annotations, pass --exclude-warning-annotations to pytest.

Screenshot

Image from Gyazo

Release files for pytest-github-actions-annotate-failures 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-github-actions-annotate-failures 0.4.2
File Size Uploaded
pytest_github_actions_annotate_failures-0.4.2.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-github-actions-annotate-failures 0.4.2
File Interpreter ABI Platform
pytest_github_actions_annotate_failures-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / pytest_github_actions_annotate_failures-0.4.2.tar.gz

Download URL pytest_github_actions_annotate_failures-0.4.2.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5dd18304512361788bc7b5c5c805db853f03f4950c6be09b088de6bab8e2e6c9
BLAKE2b-256 checksum
How to use checksums
00a0bdb91581b03c41016c78e16b8ec36c34d8508206fcb30f1951c9cdff2e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / pytest_github_actions_annotate_failures-0.4.2-py3-none-any.whl

Download URL pytest_github_actions_annotate_failures-0.4.2-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02911cd3b55f235328a334f8ca6037a89944398b8e8b028c82de97111eff4071
BLAKE2b-256 checksum
How to use checksums
3c09c44e658f3a27c588c2017d858c8b0fa962612af9b74326beabbf010c839c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page