From 45ea7e3e00210c9b5b8868056d504fe9b3958143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Thu, 24 Oct 2019 01:16:50 +0200 Subject: [PATCH] add ci --- .travis.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4dfcf7f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ + +language: python +dist: xenial +cache: pip + +addons: + apt: + update: true + packages: shellcheck + +install: + - pip3 install pylint bandit mccabe + +script: + - for file in $(find . -type f -name \"*.sh\"); do shellcheck --format=gcc $file; done; + - find . -name "*.py" -exec python3 -m py_compile '{}' \; + - find . -name "*.py" -exec pylint '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi + - find . -name "*.py" -exec python3 -m mccabe --min 3 '{}' + || if [ $? -eq 1 ]; then echo "you fail"; fi + - bandit -r . +