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@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
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_github_actions_annotate_failures-0.3.0.tar.gz.
File metadata
- Download URL: pytest_github_actions_annotate_failures-0.3.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4c3177c98046c3900a7f8ddebb22ea54b9f6822201b5d3ab8fcdea51e010db7
|
|
| MD5 |
78a63f746efe2fbd9d1e4158b8896ba1
|
|
| BLAKE2b-256 |
39d4c54ee6a871eee4a7468e3a8c0dead28e634c0bc2110c694309dcb7563a66
|
File details
Details for the file pytest_github_actions_annotate_failures-0.3.0-py3-none-any.whl.
File metadata
- Download URL: pytest_github_actions_annotate_failures-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41ea558ba10c332c0bfc053daeee0c85187507b2034e990f21e4f7e5fef044cf
|
|
| MD5 |
2b9dd6ed07d34f007c9b150626c5fc08
|
|
| BLAKE2b-256 |
6d737b0b15cb8605ee967b34aa1d949737ab664f94e6b0f1534e8339d9e64ab2
|