This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
61 lines (51 loc) · 1.57 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
[tox]
isolated_build = True
envlist = black,flake8,isort,mypy,griffon
skipsdist = false
[testenv]
basepython = python3.9
passenv =
CORGI_SERVER_URL
OSIDB_SERVER_URL
REQUESTS_CA_BUNDLE
[testenv:griffon]
deps =
-rrequirements/test.txt
commands =
pytest {posargs}
[flake8]
# NOTE: Any ignored errors/warnings specified below are subjective and can be changed based on
# common agreement of all developers contributing to this project.
#
# E203: whitespace before ':' (ignored per Black documentation, non PEP8-compliant)
#
extend-ignore = E203
# Keep in sync with black.line-length in pyproject.toml
max-line-length = 100
exclude = .git/,venv/,.tox/,tests/data/,build
[testenv:flake8]
deps = -r requirements/lint.txt
commands = flake8
[testenv:black]
deps = black==22.12.0
commands = black --check --diff .
[testenv:isort]
deps = -r requirements/lint.txt
commands = isort --check --diff .
[testenv:mypy]
deps = -r requirements/test.txt
commands = mypy griffon
[testenv:acceptance-tests]
deps = -r requirements/test.txt
commands = behave tests/features
[testenv:manpages]
deps = click-man
commands = click-man griffon -t man
[testenv:secrets]
deps = -r requirements/lint.txt
allowlist_externals = bash
# Check only files in the current branch which have changed, compared to the main branch, for secrets
# Scan all files for secrets if the first form fails, since Gitlab CI uses shallow clone and does not have a "main" ref
commands = /usr/bin/bash -c 'detect-secrets-hook --baseline .secrets.baseline \
$(git diff --name-only "origin/main..HEAD" || \
git ls-files)'