From fd475575ffb5036aaaf8e8e39846bfcfe775aea7 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Thu, 10 Mar 2022 10:59:10 +0530 Subject: [PATCH] ci: add pylint in ci adding pylint in ci. Closes: https://github.com/rook/rook/issues/9866 Signed-off-by: subhamkrai --- .../{yaml-lint.yaml => linters.yaml} | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) rename .github/workflows/{yaml-lint.yaml => linters.yaml} (53%) diff --git a/.github/workflows/yaml-lint.yaml b/.github/workflows/linters.yaml similarity index 53% rename from .github/workflows/yaml-lint.yaml rename to .github/workflows/linters.yaml index f888bf1d2..c235de7b0 100644 --- a/.github/workflows/yaml-lint.yaml +++ b/.github/workflows/linters.yaml @@ -1,4 +1,4 @@ -name: Yaml Lint +name: Linters on: push: tags: @@ -29,3 +29,24 @@ jobs: - name: Lint YAML files run: yamllint -c .github/workflows/.yamllint deploy/examples/ --no-warnings + + pylint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install pylint and requirements + run: | + pip install pylint + pip install pylint --upgrade + pip install requests + + - name: Lint Python files + run: pylint $(git ls-files '*.py') -E