-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (59 loc) · 1.74 KB
/
check_code.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Check Code
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
format:
name: Run format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: pip install black blackdoc # TODO: keep same black version
- name: Run black
run: black . --skip-string-normalization --target-version py39
- name: Check different
run: git diff --exit-code
# pytlint:
# name: Run Pylint
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: 3.9
# - name: Install dependencies
# run: pip install \
# flake8==6.1.0 \
# flake8-builtins==2.1.0 \
# flake8-bugbear==23.9.16 \
# flake8-coding==1.3.2 \
# flake8-comprehensions==3.14.0 \
# flake8-debugger==4.1.2 \
# flake8-eradicate==1.5.0 \
# flake8-executable==2.1.2 \
# flake8-mutable==1.2.0 \
# flake8-newspaper-style==0.4.3 \
# flake8-pie==0.16.0 \
# flake8-simplify==0.19.3 \
# pylint
# - name: Run Flake8
# run: |
# flake8 --ignore=A003,E501,C101 $(git ls-files '*.py')
# pylint --disable=C0114,E0401 $(git ls-files '*.py')