diff --git a/.github/workflows/flake8-lint.yml b/.github/workflows/flake8-lint.yml new file mode 100644 index 0000000..fcd2f62 --- /dev/null +++ b/.github/workflows/flake8-lint.yml @@ -0,0 +1,35 @@ +name: Lint with Flake8 + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + # Checkout the code from the repository + - name: Checkout code + uses: actions/checkout@v3 + + # Set up Python with the specified version + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' # Replace '3.x' with the desired Python version (e.g., '3.9') + + # Install flake8 and any additional dependencies + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 + + # Run flake8 on the specified directories/files + - name: Run flake8 + run: | + flake8 . --exclude=*.pyc --max-line-length=120 --count \ No newline at end of file