-
Notifications
You must be signed in to change notification settings - Fork 5
59 lines (55 loc) · 1.65 KB
/
code-quality.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
name: Code Quality
on:
push:
paths:
- '**.py'
- 'setup.cfg'
- 'pyproject.toml'
env:
PYTHON_VERSION: 3.9
jobs:
black:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black[jupyter]==22.3.0
- name: Analysing the code with black
run: black --check --line-length 120 wildlife_tools
isort:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install isort==5.10.1
- name: Analysing the code with isort
run: isort --check --line-length 120 wildlife_tools
# flake8:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3
# - name: Set up Python ${{ env.PYTHON_VERSION }}
# uses: actions/setup-python@v3
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install flake8==4.0.1 flake8-docstrings==1.6.0
# - name: Analysing the code with flake8
# run: flake8 wildlife_tools