Skip to content

Commit

Permalink
tests: Display pytest failures as annotations in GitHub Actions (#3207)
Browse files Browse the repository at this point in the history
Add a pytest plugin that bridges the pytest failures and special log format that is understood by GitHub Actions creating annotations in GitHub PRs. This avoids browsing the log or navigating IDE when locating the failing piece of code in question. While some Pylint-detected issues may show line 1 instead of the actual line, annotation is still helpful as a first step in learning about the detected issue.
  • Loading branch information
echoix committed Nov 7, 2023
1 parent 66be58a commit 9defa46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
python -m pip install --upgrade pip
pip install -r .github/workflows/python_requirements.txt
pip install -r .github/workflows/optional_requirements.txt
pip install pytest pytest-timeout
pip install pytest pytest-timeout pytest-github-actions-annotate-failures
- name: Create installation directory
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
pip install -r .github/workflows/optional_requirements.txt
pip install black==${{ matrix.black-version }}
pip install flake8==${{ matrix.flake8-version }}
pip install pylint==${{ matrix.pylint-version }}
pip install pylint==${{ matrix.pylint-version }} pytest-github-actions-annotate-failures
- name: Run Black
run: |
Expand Down

0 comments on commit 9defa46

Please sign in to comment.