generated from caltechlibrary/py-cli-template
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (30 loc) · 1.22 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
# @file lint.yml
# @brief GitHub Actions workflow to run flake8 on codebase
# @author Michael Hucka <[email protected]>
# @license Please see the file named LICENSE in the repository
# @repo https://github.com/caltechlibrary/iga
name: Run linters on codebase
run-name: Lint code after ${{github.event_name}} by ${{github.actor}}
on: [push, pull_request]
jobs:
flake8-lint:
name: Run flake8
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lint.txt
- name: Run flake8
uses: TrueBrain/actions-flake8@v2
with:
only_warn: 1
extra_arguments: "--show-source --config=./.flake8 --extend-exclude=iga/vendor/,dev/,docs/,tests/"
plugins: flake8>=4.0.1 flake8-bugbear>=22.4.25 flake8-builtins>=1.5.3 flake8-comprehensions>=3.8.0 flake8-executable>=2.1.1 flake8_implicit_str_concat>=0.3.0 flake8-pie>=0.15.0 flake8-simplify>=0.19.2