CI now run pylint & flake8
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Benjamin Renard 2023-01-06 22:18:46 +01:00
parent b0fd2b1c6d
commit 83ce6b9d1b
2 changed files with 13 additions and 1 deletions

View file

@ -11,6 +11,7 @@ extras_require = {
'mocker', 'mocker',
'pytest-mock', 'pytest-mock',
'pylint', 'pylint',
'flake8',
], ],
'config': [ 'config': [
'argcomplete', 'argcomplete',

View file

@ -21,9 +21,20 @@ fi
echo "Install package with dev dependencies using pip..." echo "Install package with dev dependencies using pip..."
$VENV/bin/python3 -m pip install -e ".[dev]" $QUIET_ARG $VENV/bin/python3 -m pip install -e ".[dev]" $QUIET_ARG
RES=0
# Run tests # Run tests
$VENV/bin/python3 -m pytest 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 # Clean temporary venv
[ $TEMP_VENV -eq 1 ] && rm -fr $VENV [ $TEMP_VENV -eq 1 ] && rm -fr $VENV