👷 Add a CI job for linting

This commit is contained in:
Freezed 2022-09-24 17:47:47 +02:00
parent 75824ff5ac
commit ca8e513263
2 changed files with 27 additions and 1 deletions

26
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,26 @@
stages:
- lint
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- /var/venv/
lint:
image: python:3.8-slim
stage: lint
except:
- /^wip-.*$/
- /^old-.*$/
- pitchme
script:
- python -V
- apt-get update -qq && apt-get -qq -y install make python3-venv
- python3 -m venv /var/venv/
- source /var/venv/bin/activate
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
- make --no-print-directory lint

View File

@ -15,7 +15,7 @@ import sys
from pprint import pprint as pp
from client import LDP_ALIAS, opnsrch_clt
from client import LDP_ALIAS, opnsrch_clt # pylint: disable=import-error
class CustomFormatter(