.gitlab/ci/analysis.yml
# ---------------------------
# Code Quality workflow
# ---------------------------
include:
# https://computing.docs.ligo.org/gitlab-ci-templates/
- project: computing/gitlab-ci-templates
file:
# https://computing.docs.ligo.org/gitlab-ci-templates/python/
- python.yml
# -- code quality -----------
#
# These jobs check the code for
# quality issues
#
flake8:
stage: Code quality
extends:
# https://computing.docs.ligo.org/gitlab-ci-templates/python/#.python:flake8
- .python:flake8
needs: []
variables:
# don't fail the pipeline because of linting issues,
# these are presented in the code-quality box in the
# merge_request UI
FLAKE8_OPTIONS: "--exit-zero"
before_script:
# pick requirements out of the setup.cfg
- python -m pip install setuptools
- |
REQUIREMENTS=$(python -c "
import shlex
from setuptools import Distribution
dist = Distribution()
dist.parse_config_files()
print(shlex.join(dist.extras_require['lint']))")
# install things
- !reference [".python:flake8", before_script]