diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b341585..9cb7160 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest + pip install flake8 pytest pytest-mock pip install --use-pep517 -r requirements.txt - name: Lint with flake8 run: | diff --git a/upgrade_deps.sh b/upgrade_deps.sh index 339edc2..00de251 100755 --- a/upgrade_deps.sh +++ b/upgrade_deps.sh @@ -108,8 +108,10 @@ done BIN="$HOME/bin" DOWNLOADS="$HOME/downloads" +PYTHON="python3.11" PIP="pip3.11" -PIPENV="python3.11 -m pipenv" +PIPENV="$PYTHON -m pipenv" +FLAKE8="$PYTHON -m flake8" # Upgrade protoc @@ -201,6 +203,16 @@ eval "$cmd" $PIPENV run python --version +# Lint + +cmd="$FLAKE8 . --count --select=E9,F63,F7,F82 --show-source --statistics" +if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi +eval "$cmd" + +cmd="$FLAKE8 . --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics" +if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi +eval "$cmd" + # Test cmd="pytest"