-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (32 loc) · 850 Bytes
/
pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
name: Pull Request
on:
push:
branches:
- master
pull_request:
env:
PYTHON_VERSION: '3.9'
jobs:
linting:
name: Lint files
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup pre-commit cache
uses: actions/cache@v3
with:
path: |
~/.cache/pre-commit
key: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml*') }}
restore-keys: |
${{ runner.os }}-${{ env.PYTHON_VERSION }}-pre-commit-
- name: Create environment
run: |
pip install pre-commit
pre-commit run --all-files