name: Lint
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
lint:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install linting tools
run: |
python -m pip install --upgrade pip
pip install flake8 pylint black isort
- name: Lint with flake8
run: |
# Stop on syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# Warnings (non-blocking)
flake8 . --count --max-complexity=10 --max-line-length=120 --statistics || true
continue-on-error: true
- name: Check import sorting
run: |
isort --check-only --diff . || echo "Import sorting issues (non-blocking)"
continue-on-error: true