Skip to content

Commit

Permalink
Add flake8 to test requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
lechat committed Jan 25, 2023
1 parent ce36949 commit 4abe426
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
- name: Setup the Pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: >-
${{ matrix.python-version }}-pip-${{ hashFiles('setup.cfg') }}-${{
hashFiles('setup.py') }}-${{ hashFiles('tox.ini') }}-${{
hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ matrix.python-version }}-pip-
${{ matrix.python-version }}-
- name: Install dependencies
run: |
sudo apt-get update; sudo apt-get install gcc libkrb5-dev
Expand All @@ -35,8 +52,9 @@ jobs:
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics
- name: Test with pytest
env:
JENKINS_VERSION: stable
run: |
pytest -sv -cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests
pytest -sv --cov=jenkinsapi --cov-report=term-missing --cov-report=xml jenkinsapi_tests
3 changes: 2 additions & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pytest==3.7.0
pytest
pytest-mock
pytest-cov
pycodestyle>=2.3.1
Expand All @@ -8,3 +8,4 @@ tox>=2.3.1
mock
codecov
requests_kerberos
flake8

0 comments on commit 4abe426

Please sign in to comment.