[WIP] Add smart workflows for repository management #3
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: Python Lint | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'spec-kit-partner/src/**/*.py' | |
| - '.github/workflows/python-lint.yml' | |
| pull_request: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'spec-kit-partner/src/**/*.py' | |
| - '.github/workflows/python-lint.yml' | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| - name: Install linting dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 pylint | |
| - name: Lint with flake8 | |
| run: | | |
| # Stop the build if there are Python syntax errors or undefined names | |
| flake8 spec-kit-partner/src --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # Exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
| flake8 spec-kit-partner/src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Lint with pylint | |
| run: | | |
| pylint spec-kit-partner/src --exit-zero --max-line-length=127 |