Add code style checker CI (#321)

Add code style checker CI
This commit is contained in:
Atsushi Sakai
2020-05-03 23:02:59 +09:00
committed by GitHub
parent eb7411bbad
commit e8a006f747
3 changed files with 21 additions and 8 deletions

View File

@@ -21,17 +21,12 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: install coverage
run: pip install coverage
- name: install mypy
run: pip install mypy
- name: install pycodestyle
run: pip install pycodestyle
- name: mypy check
run: |
find AerialNavigation -name "*.py" | xargs mypy
@@ -43,7 +38,10 @@ jobs:
find PathPlanning -name "*.py" | xargs mypy
find PathTracking -name "*.py" | xargs mypy
find SLAM -name "*.py" | xargs mypy
- name: do diff style check
run: bash rundiffstylecheck.sh
- name: do all unit tests
run: bash runtests.sh