Mohammed Naser | cd45be9 | 2022-08-29 15:07:17 -0400 | [diff] [blame] | 1 | name: lint |
| 2 | on: |
| 3 | pull_request: |
Mohammed Naser | cd45be9 | 2022-08-29 15:07:17 -0400 | [diff] [blame] | 4 | |
| 5 | jobs: |
okozachenko1203 | 340ddf9 | 2023-01-28 00:03:55 +1100 | [diff] [blame] | 6 | Pre-commit: |
| 7 | runs-on: ubuntu-latest |
| 8 | steps: |
| 9 | - name: Checkout project |
dependabot[bot] | 804e8d2 | 2023-09-06 16:51:40 -0400 | [diff] [blame] | 10 | uses: actions/checkout@v4 |
okozachenko1203 | 340ddf9 | 2023-01-28 00:03:55 +1100 | [diff] [blame] | 11 | |
| 12 | - name: Setup Python |
renovate[bot] | 7866afa | 2023-12-29 19:21:33 -0500 | [diff] [blame] | 13 | uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 |
okozachenko1203 | 340ddf9 | 2023-01-28 00:03:55 +1100 | [diff] [blame] | 14 | |
Tadas Sutkaitis | bd4de53 | 2023-08-01 10:59:54 +0200 | [diff] [blame] | 15 | - name: Get Python info |
| 16 | id: python_info |
| 17 | run: echo info=$(python -VV | sha256sum | cut -d' ' -f1) >> $GITHUB_OUTPUT |
| 18 | |
| 19 | - name: Create pre-commit cache |
| 20 | uses: actions/cache@v3 |
| 21 | with: |
| 22 | path: ~/.cache/pre-commit |
| 23 | key: pre-commit|${{ steps.python_info.outputs.info }}|${{ hashFiles('.pre-commit-config.yaml') }} |
| 24 | |
okozachenko1203 | 340ddf9 | 2023-01-28 00:03:55 +1100 | [diff] [blame] | 25 | - name: Setup pre-commit |
| 26 | uses: pre-commit/action@v3.0.0 |