-
Notifications
You must be signed in to change notification settings - Fork 37
76 lines (71 loc) · 1.73 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
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
73
74
75
76
---
name: Code Linting
on:
pull_request:
branches:
- 'master'
paths:
- '**'
- '!docs/**'
- '!*.rst'
- '!*.md'
- '!datacube_ows/__init__.py'
- '!.github/**'
- '.github/workflows/lint.yml'
push:
branches:
- 'master'
paths:
- '**'
- '!docs/**'
- '!*.rst'
- '!*.md'
- '!datacube_ows/__init__.py'
- '!.github/**'
- '.github/workflows/lint.yml'
jobs:
pylint:
runs-on: ubuntu-latest
name: Pylint
steps:
- name: checkout git
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies and run pylint
run: |
pip install .[test,dev]
pylint -j 2 --reports no datacube_ows --disable=C,R,W,E1136
flake8:
name: flake8
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- run: python -m pip install flake8
- name: flake8 cleanup imported but unused
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: flake8
run: |
flake8 . --exclude Dockerfile --ignore=E501 --select=F401,E201,E202,E203,E502,E241,E225,E306,E231,E226,E123,F811
isort:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- run: python -m pip install isort
- name: isort
uses: liskin/gh-problem-matcher-wrap@v3
with:
linters: isort
run: |
isort --check --diff .