-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (65 loc) · 1.58 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
---
name: Linting
on:
pull_request:
paths:
- '**'
push:
paths:
- '**'
env:
ORG: opendatacube
IMAGE: wps
jobs:
# quality-check:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Code
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Build WPS image
# run: |
# docker build --tag ${ORG}/${IMAGE}:latest .
# - name: Lint WPS image
# run: |
# docker run ${ORG}/${IMAGE}:latest /bin/sh -c "./lint-code.sh"
isort:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- run: python -m pip install isort
- name: isort
uses: liskin/gh-problem-matcher-wrap@v1
with:
linters: isort
run: |
isort --check --diff .
bandit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run bandit
uses: tj-actions/bandit@v5
with:
targets: | # or a single string "."
test_package
options: "-r -s B101,B104"
pylint:
runs-on: ubuntu-latest
name: Pylint
steps:
- name: checkout git
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install airflow and run pylint
run: |
pip install -r requirements.txt
pip install pylint
pylint -j 2 --reports no datacube_wps --disable=C,R,redefined-builtin,fixme,arguments-differ