| name: Pylint on Changed Files |
| |
| on: [push, pull_request] |
| |
| jobs: |
| pylint: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Checkout code |
| uses: actions/checkout@v3 |
| with: |
| fetch-depth: 0 # Important for git diff to work correctly |
| |
| - name: Get changed files |
| id: changed-files |
| uses: tj-actions/changed-files@v35 |
| with: |
| files: | |
| **.py |
| |
| - name: Set up Python |
| uses: actions/setup-python@v3 |
| with: |
| python-version: '3.11' |
| |
| - name: Install pylint |
| run: pip install pylint |
| |
| - name: Run pylint on changed files |
| run: pylint ${{ steps.changed-files.outputs.all_changed_files }} |