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.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
)
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.
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
File details
Details for the file pytest-github-actions-annotate-failures-0.1.7.tar.gz
.
File metadata
- Download URL: pytest-github-actions-annotate-failures-0.1.7.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6af8f9d13f1f09ef4c104a30875a4975db131ddbba979c8e48fdc456c8dde1f |
|
MD5 | 11ed3c2f53a31ead0937ffad0daa1f18 |
|
BLAKE2b-256 | 072fc203a7d8df92453fea36e0135d47e5b47b6bf920b7d5ff388f31fdef0292 |
File details
Details for the file pytest_github_actions_annotate_failures-0.1.7-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_github_actions_annotate_failures-0.1.7-py2.py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4a7346d1d95f731a6b53e9a45f10ca56593978149266dd7526876cce403ea38 |
|
MD5 | 51bcd9082c11e0c722493562bfa1685a |
|
BLAKE2b-256 | 7e15669aba06ec65b951d6856f9ea14a1c19dc650c4993d02eae341dc958513a |