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 |
| 10 | uses: actions/checkout@v3 |
| 11 | |
| 12 | - name: Setup Python |
| 13 | uses: actions/setup-python@v4 |
| 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 |