From 83ce6b9d1bad83004deb8f550e0240d35d7cae36 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Fri, 6 Jan 2023 22:18:46 +0100 Subject: [PATCH] CI now run pylint & flake8 --- setup.py | 1 + tests.sh | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 41d2f97..d80a168 100644 --- a/setup.py +++ b/setup.py @@ -11,6 +11,7 @@ extras_require = { 'mocker', 'pytest-mock', 'pylint', + 'flake8', ], 'config': [ 'argcomplete', diff --git a/tests.sh b/tests.sh index 8b0a121..ac08b88 100755 --- a/tests.sh +++ b/tests.sh @@ -21,9 +21,20 @@ fi echo "Install package with dev dependencies using pip..." $VENV/bin/python3 -m pip install -e ".[dev]" $QUIET_ARG +RES=0 # Run tests $VENV/bin/python3 -m pytest tests -RES=$? +[ $? -ne 0 ] && RES=1 + +# Run pylint +echo "Run pylint..." +$VENV/bin/pylint --extension-pkg-whitelist=cx_Oracle mylib tests +[ $? -ne 0 ] && RES=1 + +# Run flake8 +echo "Run flake8..." +$VENV/bin/flake8 mylib tests +[ $? -ne 0 ] && RES=1 # Clean temporary venv [ $TEMP_VENV -eq 1 ] && rm -fr $VENV