diff --git a/.github/workflows/coding_style_checks.yml b/.github/workflows/coding_style_checks.yml index ac30e70c..a8ec73f9 100644 --- a/.github/workflows/coding_style_checks.yml +++ b/.github/workflows/coding_style_checks.yml @@ -23,3 +23,20 @@ jobs: source: './app/src' extensions: 'h,c' version: 15 + + pylint_check: + name: Python Lint Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.9' + + - name: Install pylint + run: pip install pylint -r tests/requirements.txt + + - name: Run pylint with .pylintrc + run: pylint --errors-only --rcfile=tests/integration/.pylintrc tests/integration/nano/ diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 4c051d2f..863ce041 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -12,4 +12,4 @@ jobs: python-version: '3.10' - run: python -m pip install pre-commit - run: python -m pip freeze --local - - run: SKIP=clang-format pre-commit run --all-files + - run: SKIP=clang-format,pylint pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8675de0c..3d97c639 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,3 +19,12 @@ repos: language: system files: ^ types: [file, c] + + - id: pylint + name: pylint + description: Run pylint with custom .pylintrc configuration + entry: pylint + language: system + pass_filenames: false + args: ["--errors-only", "--rcfile=tests/integration/.pylintrc", "tests/integration/nano/"] + types: [python] diff --git a/tests/requirements.txt b/tests/requirements.txt index 419eeb13..8621f945 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -6,3 +6,4 @@ base58 pytezos GitPython pytest-xdist +ragger[tests,speculos,ledgerwallet]