ci: pip install pytest-mock

This commit is contained in:
scito
2022-12-29 04:24:00 +01:00
parent c90526dcf2
commit 829fe65b1e
2 changed files with 14 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install flake8 pytest pip install flake8 pytest pytest-mock
pip install --use-pep517 -r requirements.txt pip install --use-pep517 -r requirements.txt
- name: Lint with flake8 - name: Lint with flake8
run: | run: |

View File

@@ -108,8 +108,10 @@ done
BIN="$HOME/bin" BIN="$HOME/bin"
DOWNLOADS="$HOME/downloads" DOWNLOADS="$HOME/downloads"
PYTHON="python3.11"
PIP="pip3.11" PIP="pip3.11"
PIPENV="python3.11 -m pipenv" PIPENV="$PYTHON -m pipenv"
FLAKE8="$PYTHON -m flake8"
# Upgrade protoc # Upgrade protoc
@@ -201,6 +203,16 @@ eval "$cmd"
$PIPENV run python --version $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 # Test
cmd="pytest" cmd="pytest"