-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 1.04 KB
/
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
32
33
34
35
36
37
38
name: Lint
on:
push:
branches: [main]
pull_request:
# Check all PR
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black isort
# - name: Lint with flake8
# run: |
# # ignore formatting, it will be checked by black
# export FORMATTING_RULES="E101,E111,E114,E115,E116,E117,E12,E13,E2,E3,E401,E5,E70,W1,W2,W3,W5"
# flake8 --ignore=$FORMATTING_RULES .
- name: Lint with black
run: |
black --check .
black --diff .
- name: Check imports
run: |
isort anisoap/*/*py -m 3 --tc --fgw --up -e -l 88 --check
isort anisoap/*py -m 3 --tc --fgw --up -e -l 88 --check