-
Notifications
You must be signed in to change notification settings - Fork 73
31 lines (31 loc) · 1.09 KB
/
lint_python.yml
File metadata and controls
31 lines (31 loc) · 1.09 KB
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_python
on:
pull_request:
push:
# branches: [master]
jobs:
lint_python:
runs-on: ubuntu-latest
# strategy:
# matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
# python-version: [2.7, 3.5, 3.6, 3.7, 3.8] # , pypy3]
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
# with:
# python-version: ${{ matrix.python-version }}
- run: pip install black codespell flake8 isort pytest reorder-python-imports
- run: black --check . || true
# - run: black --diff . || true
# - if: matrix.python-version >= 3.6
# run: |
# pip install black
# black --check . || true
- run: codespell --ignore-words-list="iam" --quiet-level=2 # --skip=""
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# isort and reorder-python-imports are two ways of doing the same thing
- run: isort --recursive . || true
- run: reorder-python-imports . || true
- run: pip install -r requirements.txt || true
- run: pytest . || true