Skip to content

Commit 172cfed

Browse files
committed
feat: add GHA to run flake8 on pushes & TRs
1 parent 0925c2d commit 172cfed

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/lint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# @file lint.yml
2+
# @brief GitHub Actions workflow to run flake8 on codebase
3+
# @author Michael Hucka <[email protected]>
4+
# @license Please see the file named LICENSE in the repository
5+
# @repo https://github.com/caltechlibrary/iga
6+
7+
name: Run linters on codebase
8+
run-name: Lint code after ${{github.event_name}} by ${{github.actor}}
9+
10+
on: [push, pull_request]
11+
12+
jobs:
13+
flake8-lint:
14+
name: Run flake8
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out source repository
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Python environment
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.11"
24+
cache: 'pip'
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
python -m pip install -r requirements-lint.txt
30+
31+
- name: Run flake8
32+
uses: TrueBrain/actions-flake8@v2
33+
with:
34+
only_warn: 1
35+
extra_arguments: "--show-source --config=./.flake8 --extend-exclude=iga/vendor/,dev/,docs/,tests/"
36+
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

0 commit comments

Comments
 (0)