Merge pull request #284 from apache/sebb-where-cond #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: Linting and MyPy (Pelican) | |
| on: | |
| push: | |
| paths: | |
| - '**.py' | |
| - '**/linting.yml' | |
| - '**/pylintrc' | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python environment | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| pip list | |
| cd pelican | |
| pip install -r requirements.txt --no-deps # Explicit dependency-only installation | |
| pip install mypy types-PyYAML types-requests types-beautifulsoup4 types-markdown pylint | |
| pip list | |
| - name: Type testing with mypy | |
| run: | | |
| cd pelican | |
| mypy --cache-dir /tmp/ --install-types --non-interactive | |
| mypy --cache-dir /tmp/ --ignore-missing-imports . | |
| - name: Code linting with pylint | |
| run: | | |
| cd pelican | |
| pylint **/*.py |