readthedocs added #90
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint and Style Checks | |
| on: | |
| push: | |
| branches: [ "main", "master" ] | |
| pull_request: | |
| branches: [ "main", "master" ] | |
| jobs: | |
| lint: | |
| name: Lint & Style Checks | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| language: [ 'python' ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Cache pip dependencies | |
| id: cache-pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml', 'requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install System Dependencies (Tkinter) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y python3-tk | |
| - name: Install Python and Project Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| pip install -e . | |
| - name: Run Style & Syntax Check (Flake8) | |
| run: | | |
| echo "STEP 1: Checking for critical syntax errors..." | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| echo "STEP 2: Checking for code style warnings..." | |
| flake8 . --count --exit-zero --max-complexity=18 --max-line-length=127 --statistics |