webshop/.travis.yml

27 lines
886 B
YAML
Raw Normal View History

2020-11-27 04:30:44 +01:00
language: python
2020-11-27 05:49:29 +01:00
python:
- "3.9"
2020-11-27 04:50:07 +01:00
arch: amd64
2020-11-27 04:33:03 +01:00
os: linux
2020-11-27 04:30:44 +01:00
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
2020-11-29 04:44:30 +01:00
- bandit -r --ini bandit.ini
2020-11-27 04:30:44 +01:00
script:
2020-11-27 04:38:50 +01:00
- docker build -t="registry.kmlabz.com/unstablevortex/webshop:$TRAVIS_BUILD_NUMBER" . && docker push "registry.kmlabz.com/unstablevortex/webshop:$TRAVIS_BUILD_NUMBER"
- docker build -t="registry.kmlabz.com/unstablevortex/webshop" . && docker push "registry.kmlabz.com/unstablevortex/webshop"