pytest plugin to annotate failed tests with a workflow command for GitHub Actions
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)
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.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for pytest-github-actions-annotate-failures-0.1.6.tar.gz
Hashes for pytest_github_actions_annotate_failures-0.1.6-py2.py3-none-any.whl