| name: lint |
| on: |
| pull_request: |
| |
| jobs: |
| Pre-commit: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Checkout project |
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 |
| |
| - name: Setup Python |
| uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 |
| |
| - name: Get Python info |
| id: python_info |
| run: echo info=$(python -VV | sha256sum | cut -d' ' -f1) >> $GITHUB_OUTPUT |
| |
| - name: Create pre-commit cache |
| uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4 |
| with: |
| path: ~/.cache/pre-commit |
| key: pre-commit|${{ steps.python_info.outputs.info }}|${{ hashFiles('.pre-commit-config.yaml') }} |
| |
| - name: Setup pre-commit |
| uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 |