Skip to content

Commit

Permalink
Create pylint.yml
Browse files Browse the repository at this point in the history
Created separate action runner for linting
  • Loading branch information
abodeuis authored Jul 16, 2024
1 parent 6dd394f commit d47e332
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pylint

on: [push]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
lint-directories: ["./cdrhook", "./tests", "./uploader", "./monitor"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ${{ matrix.lint-directories }} --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 ${{ matrix.lint-directories }} --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

0 comments on commit d47e332

Please sign in to comment.