diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..db718acaa --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: Lint + +on: + push: + paths: + - 'saltproc/**' + - 'tests/**' + pull_request: + paths: + - 'saltproc/**' + - 'tests/**' + +jobs: + flake8: + name: flake8 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install flake8 + run: pip install flake8 + + - name: Run flake8 + run: | + flake8 saltproc/ tests/ \ + --select=E9,F401,F811,F821,F841 \ + --max-line-length=120 \ + --show-source \ + --statistics