diff --git a/.github/workflows/lint-py.yml b/.github/workflows/lint-py.yml index 2cfbebd..7c6f76f 100644 --- a/.github/workflows/lint-py.yml +++ b/.github/workflows/lint-py.yml @@ -24,5 +24,11 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Run linter - run: find . -name "*.py" | xargs pylint + - name: Run linter for images code + run: find . -name "*.py" ! -path "*/tests/*" | xargs pylint + + - name: Install pylint dependencies for tests + run: pip3 install pytest + + - name: Run linter for tests code + run: find "./tests" -name "*.py" | xargs pylint --rcfile=pylintrc.tests diff --git a/pylintrc.tests b/pylintrc.tests new file mode 100644 index 0000000..aa7425f --- /dev/null +++ b/pylintrc.tests @@ -0,0 +1,7 @@ +[tests-configuration] +disable = duplicate-code, # Tests having similar code + no-member, # pytest global variables in conftest.py not detected + consider-using-with, # conftest temporary directory would need a with + import-error # EntrypointHook unable to import entrypoint + +