added gitlab ci

This commit is contained in:
Tobias Schmidl 2021-03-01 09:41:18 +01:00
parent 9241593527
commit 1a661476dd
2 changed files with 23 additions and 4 deletions

22
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,22 @@
image: python
test:pylama:
stage: test
only:
- master
- develop
before_script:
- if test -r requirements.txt; then pip install -r requirements.txt; fi
script:
if test -x "$(which pylama)"; then pylama *.py; fi
test:pytest:
stage: test
only:
- master
- develop
before_script:
- if test -r requirements.txt; then pip install -r requirements.txt; fi
script:
if test -x "$(which pytest)"; then pytest .; fi

View file

@ -1,14 +1,11 @@
[pylama] [pylama]
format = pylint format = pylint
linters = mccabe,pep257,pydocstyle,pep8,pycodestyle,pyflakes,pylint,isort linters = eradicate,isort,mccabe,mypy,pycodestyle,pydocstyle,pyflakes,pylint
ignore = D203 ignore = D203
skip=.env/* skip=.env/*
[pylama:pycodestyle] [pylama:pycodestyle]
max_line_length = 120 max_line_length = 120
[pylama:pep8]
max_line_length = 120
[pylama:pylint] [pylama:pylint]
max_line_length = 120 max_line_length = 120