-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (32 loc) · 1.16 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
name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
# Black has a first-party ci/cd solution doesn't require python or setup, so use that
# before running setup.
- name: Run Black
uses: psf/black@stable
with:
options: "--check --verbose --exclude vision_opencv"
src: "./src"
version: 24.8.0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.10.12
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pylint==3.2.7 mypy==1.11.2 moteus
- name: Run Pylint
# Ignoring ros packages is unideal, but installing them as packages is not trivial
run: |
pylint --fail-under=8 --ignored-modules=rclpy,std_msgs,ament_copyright,ament_flake8,pytest,launch,vision_opencv --ignore-paths=^src/vision_opencv.*$ ./src
- name: Run Mypy
run: |
mypy --exclude /test/ --exclude setup\.py --exclude vision_opencv ./src