Skip to content

Commit

Permalink
Added new module "pylint-exit" which allows the workflow to only fail…
Browse files Browse the repository at this point in the history
… on fatal error.
  • Loading branch information
devinhunsberger committed Oct 25, 2024
1 parent f695429 commit 42bcdec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pylint
pip install flake8 pytest pylint pylint-exit
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
Expand All @@ -29,7 +29,8 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Lint with PyLint
run: |
pylint $(git ls-files '*.py'); if [ $(( $? & 2 )) -eq 2 ]; then exit 1; else exit 0; fi
pylint $(git ls-files '*.py') || pylint-exit $?
# Allows pylint to exit "gracefully" meaning we will only fail build if we get a fatal error.
- name: Test with pytest
run: |
pytest

0 comments on commit 42bcdec

Please sign in to comment.