diff --git a/.drone.yml b/.drone.yml index e78cc23..4e296fa 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,10 +1,52 @@ +# 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 .venv + - source ./.venv/bin/activate + - 'pip install pylama pylama\[all\]' + - pylama + when: + event: + include: + - 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/pylama.ini b/pylama.ini new file mode 100644 index 0000000..3e4c7a2 --- /dev/null +++ b/pylama.ini @@ -0,0 +1,14 @@ +# https://github.com/klen/pylama#configuration-file +[pylama] +format = pylint +skip = .venv/*,.pylama-venv/* +linters = pyflakes,pylint,pycodestyle +#ignore = F0401,C0111,E731 + +[pylama:pylint] +max_line_length = 120 +score = yes + +[pylama:pycodestyle] +# Maximum length of each line +max_line_length = 120 \ No newline at end of file