mirror of
https://github.com/scito/extract_otp_secrets.git
synced 2026-01-04 03:43:33 +01:00
ci: fix mypy and pytest-cov after clean
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -46,8 +46,8 @@ jobs:
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics
|
||||
- name: Type checking with mypy
|
||||
run: |
|
||||
mypy --install-types --non-interactive src tests
|
||||
mypy --strict src tests
|
||||
mypy --install-types --non-interactive src/*.py tests/*.py
|
||||
mypy --strict src/*.py tests/*.py
|
||||
if: matrix.python-version == '3.x'
|
||||
- name: Test with pytest
|
||||
run: pytest
|
||||
|
||||
@@ -240,13 +240,13 @@ eval "$cmd"
|
||||
|
||||
# Type checking
|
||||
|
||||
cmd="$MYPY --install-types --non-interactive *.py"
|
||||
cmd="$MYPY --install-types --non-interactive src/*.py tests/*.py"
|
||||
if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi
|
||||
eval "$cmd"
|
||||
|
||||
# change to src as python -m mypy adds the current dir Python sys.path
|
||||
# execute in a subshell in order not to loose the exit code and not to change the dir in the currrent shell
|
||||
cmd="(cd src && $MYPY --strict *.py ../tests)"
|
||||
cmd="$MYPY --strict src/*.py tests/*.py"
|
||||
if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi
|
||||
eval "$cmd"
|
||||
|
||||
@@ -275,7 +275,7 @@ if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";
|
||||
eval "$cmd"
|
||||
|
||||
COVERAGE_OUT="tests/reports/pytest-coverage.txt"
|
||||
cmd="pytest --cov=test_extract_otp_secret_keys_pytest --junitxml=tests/reports/pytest.xml --cov-report html:tests/reports/html --cov-report=term-missing tests/ | tee $COVERAGE_OUT"
|
||||
cmd="mkdir -p tests/reports; pytest --cov=test_extract_otp_secret_keys_pytest --junitxml=tests/reports/pytest.xml --cov-report html:tests/reports/html --cov-report=term-missing tests/ | tee $COVERAGE_OUT"
|
||||
if $interactive ; then askContinueYn "$cmd"; else echo -e "${cyan}$cmd${reset}";fi
|
||||
eval "$cmd"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user