Compare commits

...

2 commits

Author SHA1 Message Date
Alexey Skobkin 5d4a43e2c6 Merge pull request 'Pylama code audit' (#13) from feature_pylama into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #13
2022-05-02 17:38:30 +03:00
Alexey Skobkin e69e63a9a3 Pylama draft.
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-05-02 17:32:59 +03:00
2 changed files with 58 additions and 2 deletions

View file

@ -1,10 +1,52 @@
# https://docs.drone.io/pipeline/overview/
# https://docs.drone.io/pipeline/configuration/
kind: pipeline kind: pipeline
name: default type: docker
name: build
steps: steps:
- name: environment - name: build-app
image: 'python:3.10-alpine' image: 'python:3.10-alpine'
commands: commands:
- python -m venv .venv - python -m venv .venv
- source ./.venv/bin/activate - source ./.venv/bin/activate
- pip install -r requirements.txt - 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

14
pylama.ini Normal file
View file

@ -0,0 +1,14 @@
# https://github.com/klen/pylama#configuration-file
[pylama]
format = pylint
skip = .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