forked from jonathanhogg/flitter
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 833 Bytes
/
ci-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
name: CI lint
on:
push:
branches: ["main"]
paths:
- ".github/workflows/ci-lint.yml"
- "pyproject.toml"
- ".flake8"
- "src/**/*.py"
- "src/**/*.pyx"
- "src/**/*.pxd"
- "tests/**/*.py"
- "scripts/**/*.py"
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install linter dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 cython-lint
- name: Lint Python code with flake8
run: |
flake8 src tests scripts --count --show-source --statistics
- name: Lint Cython code with cython-lint
run: |
cython-lint src