Skip to main content

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

Project description

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@v2

    - uses: actions/setup-python@v1
      with:
        python-version: 3.7

    - 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)

Screenshot

Image from Gyazo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

File details

Details for the file pytest-github-actions-annotate-failures-0.1.2.tar.gz.

File metadata

  • Download URL: pytest-github-actions-annotate-failures-0.1.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for pytest-github-actions-annotate-failures-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9eb6ee2943ecde2078fe620af7dbf32646c0267f538435cd805fe2e8d735ca3a
MD5 767f3a10c56823db0f2b2085d0e22ab0
BLAKE2b-256 3ba9a27c6664f6ae2d0352cce92db6580b1f1474d51557c2bcdf15fe3daa8b91

See more details on using hashes here.

File details

Details for the file pytest_github_actions_annotate_failures-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_github_actions_annotate_failures-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e0c4bd8720450fc37c4ee63465023101301980c2d24f14f8ab25358ba1fa68d4
MD5 e7396a7d23e3cc81b30ef4dfa1416d0b
BLAKE2b-256 4b4ab81facd2dd65fcdd6c26c3537a08d748f557907c2b809397f97e4c390d96

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page