From a98917590fc371c361135ed155110836993f97dd Mon Sep 17 00:00:00 2001 From: marcsello Date: Fri, 27 Nov 2020 06:20:54 +0100 Subject: [PATCH] Added .travis.yml --- .travis.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1277b62 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +language: python +python: + - "3.9" +arch: amd64 +os: linux +dist: focal +virt: vm +cache: pip + +services: + - docker + +before_install: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin registry.kmlabz.com + +install: + - pip3 install pylint bandit mccabe + +before_script: + - 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 . + +script: + - docker build -t="registry.kmlabz.com/unstablevortex/caff-previewer-wrapper:$TRAVIS_BUILD_NUMBER" . + - docker tag "registry.kmlabz.com/unstablevortex/caff-previewer-wrapper:$TRAVIS_BUILD_NUMBER" "registry.kmlabz.com/unstablevortex/caff-previewer-wrapper:latest" + - docker push "registry.kmlabz.com/unstablevortex/caff-previewer-wrapper" \ No newline at end of file