From 321effcd04eddabd847507e6686bef210ffecceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Wed, 22 Jan 2020 14:36:32 +0100 Subject: [PATCH] add hidden files --- .dockerignore | 4 ++++ .gitignore | 1 + .travis.yml | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 .dockerignore create mode 100644 .gitignore create mode 100644 .travis.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e4a2141 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git/ +*.md +LICENSE +Dockerfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4eeb7ca --- /dev/null +++ b/.travis.yml @@ -0,0 +1,21 @@ +language: python +dist: bionic +cache: pip + +services: + - docker + +install: + - pip3 install pylint bandit mccabe + - pip3 install -r requirements.txt + +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: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + - docker build -t="$TRAVIS_REPO_SLUG:$TRAVIS_BUILD_NUMBER" . && docker push "$TRAVIS_REPO_SLUG:$TRAVIS_BUILD_NUMBER" + - docker build -t="$TRAVIS_REPO_SLUG" . && docker push "$TRAVIS_REPO_SLUG"