-
Notifications
You must be signed in to change notification settings - Fork 3
31 lines (29 loc) · 978 Bytes
/
lint.yml
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
name: lint
on: [pull_request, workflow_dispatch]
jobs:
linting:
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
#----------------------------------------------
# load pip cache if cache exists
#----------------------------------------------
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
restore-keys: ${{ runner.os }}-pip
#----------------------------------------------
# run linters
#----------------------------------------------
- run: python -m pip install black[jupyter] flake8 isort
- run: |
flake8 --show-source .
black . --check
isort .