pytest-github-actions-annotate-failures


Namepytest-github-actions-annotate-failures JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
Summarypytest plugin to annotate failed tests with a workflow command for GitHub Actions
upload_time2025-01-17 22:39:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords ansible testing molecule plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pytest-github-actions-annotate-failures
[Pytest](https://pypi.org/project/pytest/) plugin to annotate failed tests with a [workflow command for GitHub Actions](https://help.github.com/en/actions/reference/workflow-commands-for-github-actions)

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

```yaml
name: test

on:
  push:

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3

    - uses: actions/setup-python@v4
      with:
        python-version: 3.8

    - 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](https://i.gyazo.com/b578304465dd1b755ceb0e04692a57d9.png)](https://gyazo.com/b578304465dd1b755ceb0e04692a57d9)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pytest-github-actions-annotate-failures",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "utgwkk <utagawakiki@gmail.com>",
    "keywords": "ansible, testing, molecule, plugin",
    "author": null,
    "author_email": "utgwkk <utagawakiki@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/39/d4/c54ee6a871eee4a7468e3a8c0dead28e634c0bc2110c694309dcb7563a66/pytest_github_actions_annotate_failures-0.3.0.tar.gz",
    "platform": null,
    "description": "# pytest-github-actions-annotate-failures\n[Pytest](https://pypi.org/project/pytest/) plugin to annotate failed tests with a [workflow command for GitHub Actions](https://help.github.com/en/actions/reference/workflow-commands-for-github-actions)\n\n## Usage\nJust install and run pytest with this plugin in your workflow. For example,\n\n```yaml\nname: test\n\non:\n  push:\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/checkout@v3\n\n    - uses: actions/setup-python@v4\n      with:\n        python-version: 3.8\n\n    - name: Install dependencies\n      run: |\n        python -m pip install --upgrade pip\n        pip install -r requirements.txt\n\n    - name: Install plugin\n      run: pip install pytest-github-actions-annotate-failures\n\n    - run: pytest\n```\n\nIf 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`)\n\nIf 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.\n\n### Warning annotations\n\nThis plugin also supports warning annotations when used with Pytest 6.0+. To disable warning annotations, pass `--exclude-warning-annotations` to pytest.\n\n## Screenshot\n[![Image from Gyazo](https://i.gyazo.com/b578304465dd1b755ceb0e04692a57d9.png)](https://gyazo.com/b578304465dd1b755ceb0e04692a57d9)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "pytest plugin to annotate failed tests with a workflow command for GitHub Actions",
    "version": "0.3.0",
    "project_urls": {
        "changelog": "https://github.com/pytest-dev/pytest-github-actions-annotate-failures/releases",
        "homepage": "https://github.com/pytest-dev/pytest-github-actions-annotate-failures",
        "repository": "https://github.com/pytest-dev/pytest-github-actions-annotate-failures"
    },
    "split_keywords": [
        "ansible",
        " testing",
        " molecule",
        " plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6d737b0b15cb8605ee967b34aa1d949737ab664f94e6b0f1534e8339d9e64ab2",
                "md5": "2b9dd6ed07d34f007c9b150626c5fc08",
                "sha256": "41ea558ba10c332c0bfc053daeee0c85187507b2034e990f21e4f7e5fef044cf"
            },
            "downloads": -1,
            "filename": "pytest_github_actions_annotate_failures-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2b9dd6ed07d34f007c9b150626c5fc08",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6030,
            "upload_time": "2025-01-17T22:39:31",
            "upload_time_iso_8601": "2025-01-17T22:39:31.701584Z",
            "url": "https://files.pythonhosted.org/packages/6d/73/7b0b15cb8605ee967b34aa1d949737ab664f94e6b0f1534e8339d9e64ab2/pytest_github_actions_annotate_failures-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "39d4c54ee6a871eee4a7468e3a8c0dead28e634c0bc2110c694309dcb7563a66",
                "md5": "78a63f746efe2fbd9d1e4158b8896ba1",
                "sha256": "d4c3177c98046c3900a7f8ddebb22ea54b9f6822201b5d3ab8fcdea51e010db7"
            },
            "downloads": -1,
            "filename": "pytest_github_actions_annotate_failures-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "78a63f746efe2fbd9d1e4158b8896ba1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11248,
            "upload_time": "2025-01-17T22:39:32",
            "upload_time_iso_8601": "2025-01-17T22:39:32.722798Z",
            "url": "https://files.pythonhosted.org/packages/39/d4/c54ee6a871eee4a7468e3a8c0dead28e634c0bc2110c694309dcb7563a66/pytest_github_actions_annotate_failures-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-17 22:39:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pytest-dev",
    "github_project": "pytest-github-actions-annotate-failures",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pytest-github-actions-annotate-failures"
}
        
Elapsed time: 2.36212s