Merge pull request #2020 from cclauss/patch-1

Travis CI: Use flake8 to find Python syntax errors
This commit is contained in:
ZeroNet 2019-05-17 17:30:13 +02:00 committed by GitHub
commit 5456f0e106
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 10 deletions

View file

@ -7,8 +7,13 @@ python:
dist: xenial dist: xenial
services: services:
- docker - docker
cache: pip
before_install:
- pip install --upgrade pip wheel
- pip install codecov coveralls flake8 mock pytest pytest-cov selenium
# - docker build -t zeronet .
# - docker run -d -v $PWD:/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 zeronet
install: install:
- pip install -U pip wheel
- pip install -r requirements.txt - pip install -r requirements.txt
- pip list - pip list
before_script: before_script:
@ -26,18 +31,10 @@ script:
- python -m pytest src/Test --cov=src --cov-config src/Test/coverage.ini - python -m pytest src/Test --cov=src --cov-config src/Test/coverage.ini
- mv plugins/disabled-Multiuser plugins/Multiuser && python -m pytest -x plugins/Multiuser/Test - mv plugins/disabled-Multiuser plugins/Multiuser && python -m pytest -x plugins/Multiuser/Test
- mv plugins/disabled-Bootstrapper plugins/Bootstrapper && python -m pytest -x plugins/Bootstrapper/Test - mv plugins/disabled-Bootstrapper plugins/Bootstrapper && python -m pytest -x plugins/Bootstrapper/Test
before_install: - flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics
- pip install -U pytest mock pytest-cov selenium
- pip install codecov
- pip install coveralls
# - docker build -t zeronet .
# - docker run -d -v $PWD:/root/data -p 15441:15441 -p 127.0.0.1:43110:43110 zeronet
after_success: after_success:
- codecov - codecov
- coveralls --rcfile=src/Test/coverage.ini - coveralls --rcfile=src/Test/coverage.ini
cache:
directories:
- $HOME/.cache/pip
notifications: notifications:
email: email:
recipients: recipients:

View file

@ -208,6 +208,7 @@ class Actions(object):
for content_inner_path in site.content_manager.contents: for content_inner_path in site.content_manager.contents:
s = time.time() s = time.time()
logging.info("Verifing %s signature..." % content_inner_path) logging.info("Verifing %s signature..." % content_inner_path)
err = None
try: try:
file_correct = site.content_manager.verifyFile( file_correct = site.content_manager.verifyFile(
content_inner_path, site.storage.open(content_inner_path, "rb"), ignore_same=False content_inner_path, site.storage.open(content_inner_path, "rb"), ignore_same=False