From 37cf52177b28351fedc6ed172ae2a8012a8696e0 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Mon, 2 May 2022 16:53:19 +0300 Subject: [PATCH] Pylama draft. --- .drone.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++-- .gitignore | 1 + pylama.ini | 9 +++++++++ 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 pylama.ini diff --git a/.drone.yml b/.drone.yml index e78cc23..7c9dc70 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,10 +1,53 @@ +# https://docs.drone.io/pipeline/overview/ +# https://docs.drone.io/pipeline/configuration/ + kind: pipeline -name: default +type: docker +name: build steps: - - name: environment + - name: build-app image: 'python:3.10-alpine' commands: - python -m venv .venv - source ./.venv/bin/activate - pip install -r requirements.txt + +--- +kind: pipeline +type: docker +name: code-audit + +steps: + - name: pylama + image: 'python:3.10-alpine' + commands: + - python -m venv .pylama-venv + - source ./.pylama-venv/bin/activate + - 'pip install pylama pylama\[all\]' + - pylama + when: + event: + include: + - push + - pull_request + branch: + exclude: master + + +--- +kind: pipeline +type: docker +name: deploy + +steps: + - name: deploy + image: alpine + commands: + - 'echo "TODO: implement deploy"' + when: + branch: master + +depends_on: + - build + - code-audit diff --git a/.gitignore b/.gitignore index 5493d8f..308cdf6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ # Python /.venv +/.pylama-venv diff --git a/pylama.ini b/pylama.ini new file mode 100644 index 0000000..da0e687 --- /dev/null +++ b/pylama.ini @@ -0,0 +1,9 @@ +# https://github.com/klen/pylama#configuration-file +[pylama] +format = pylint +skip = */.venv/*,*/.pylama-venv/* +#linters = pylint,mccabe +#ignore = F0401,C0111,E731 + +[pylama:pylint] +max_line_length = 120