Verified Commit c1d0247a authored by anarcat's avatar anarcat
Browse files

enforce black in CI

We do it in a rather convoluted way (ie. tox) but it will allow us to
hook more goodies later, e.g. mypy, unit tests, etc.
parent 9e7a6887
Pipeline #20459 passed with stage
in 1 minute and 16 seconds
variables:
LC_ALL: "C.UTF-8"
LANG: "C.UTF-8"
# We use a job template to avoid mindless repetition. All of our jobs
# run 'tox', and we vary which tox environment they run or which
# Python version they use by overriding the 'TOXENV' environment
# variable or the 'image' job parameter.
#
# The name of the template starts with a dot to prevent GitLab from
# running it as an actual job.
.tox:
image: python:latest
before_script:
- pip install tox
script:
- tox
variables:
TOXENV: py
# The environment 'py' uses the version of Python used to invoke tox,
# which allows us to test various Python versions by changing the
# Docker image version in use.
flake8:
extends: .tox
variables:
TOXENV: flake8
black:
extends: .tox
variables:
TOXENV: black
# just delegate install to setup.py for now
#
# this exists mostly so we don't have to duplicate test dependencies
# between tox and setup.py
-e .
[tox]
envlist = flake8,black
[testenv:flake8]
skip_install = true
deps = flake8
commands = flake8 dangerzone-webdav-processor
[testenv:black]
skip_install = true
deps = black
commands = black --diff --check dangerzone-webdav-processor
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment