-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (58 loc) · 3.06 KB
/
lint.yaml
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
60
#
# lint.yaml
# Created by Perry Naseck on 6/28/21.
#
# Copyright (c) 2021, The CONIX Research Center
# All rights reserved.
#
# This source code is licensed under the BSD-3-Clause license found in the
# LICENSE file in the root directory of this source tree.
#
name: Lint
on: [push, pull_request]
jobs:
markdown-link-check:
name: Markdown Link Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
python-lint:
name: Python lint ${{ matrix.name }} ${{ matrix.python-version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- { python-version: "3.8", name: flake8, cmd: flake8, }
- { python-version: "3.9", name: flake8, cmd: flake8, }
- { python-version: "3.10", name: flake8, cmd: flake8, }
- { python-version: "3.9", name: pydocstyle, cmd: pydocstyle, }
- { python-version: "3.8", name: pylint, cmd: "pylint --extension-pkg-whitelist=vl53l5cx_py,cv2 --extension-pkg-allow-list=pyrealsense2" }
- { python-version: "3.9", name: pylint, cmd: "pylint --extension-pkg-whitelist=vl53l5cx_py,cv2 --extension-pkg-allow-list=pyrealsense2" }
- { python-version: "3.10", name: pylint, cmd: "pylint --extension-pkg-whitelist=vl53l5cx_py,cv2 --extension-pkg-allow-list=pyrealsense2" }
- { python-version: "3.9", name: isort, cmd: isort --check-only }
- { python-version: "3.9", name: bandit, cmd: bandit -r }
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt','**/setup.py','**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install Python Development and Realsense Dependencies
run: python -m pip install -e .[dev,realsense,apriltag_detector]
if: matrix.python-version != '3.10'
- name: Install Python Development Dependencies
run: python -m pip install -e .[dev,apriltag_detector]
if: matrix.python-version == '3.10'
- name: Ignore pyrealsense2
run: printf "[TYPECHECK]\nignored-modules=pyrealsense2" > .pylintrc
if: matrix.python-version == '3.10'
- name: Run ${{ matrix.name }}
run: python -m ${{ matrix.cmd }} arenarobot/