-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
148 lines (133 loc) · 3.85 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[tox]
envlist = py3,flake8,black,dodgy,yamllint
[testenv]
setenv =
AWS_S3_ENDPOINT_URL=http://localhost:9000
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_S3_BUCKET_NAME=francearchives
deps =
pytest
pytest-xdist
-rdev-requirements.txt
commands =
{envpython} -m pifpaf --env-prefix PIFPAF_ES run elasticsearch -- {envpython} -m pifpaf run postgresql -- {envpython} -m pytest {posargs:test}
[testenv:flake8]
basepython = python3
skip_install = true
skipsdist = true
deps =
flake8
commands = flake8
[flake8]
max-line-length = 100
exclude = cubicweb_frarchives_edition/migration/*,cubicweb_frarchives_edition/scripts/*,test/data/*,setup.py,.tox/*,appjs,node_modules,dist,sphinx/*,build
ignore =
E731,
# line break before binary operator
W503,
# line break after binary operator
W504,
# whitespace before ':'
E203,
# missing whitespace after ','
E231,
[pytest]
python_files = *test_*.py
addopts = -rfEs --tb=native -W once
[testenv:py37-gitlab-ci]
setenv =
AWS_S3_ENDPOINT_URL=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET_NAME=
passenv =
POSTGRES_HOST
POSTGRES_PORT
POSTGRES_USER
POSTGRES_PASSWORD
PYTEST_CPU_NUMBER
deps =
-rdev-requirements.txt
hg+https://franceachives:[email protected]/francearchives/cubicweb-francearchives/@default
git+https://github.com/psycojoker/pytest-capture-deprecatedwarnings
commands =
{envpython} -m pytest {posargs:test}
# TODO merge into py37-gitlab-ci when its done
[testenv:py37-default]
setenv =
AWS_S3_ENDPOINT_URL=http://minio:9000
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_S3_BUCKET_NAME=francearchives
passenv =
POSTGRES_HOST
POSTGRES_PORT
POSTGRES_USER
POSTGRES_PASSWORD
PYTEST_CPU_NUMBER
deps =
-rdev-requirements.txt
hg+https://franceachives:[email protected]/francearchives/cubicweb-francearchives/@default
git+https://github.com/psycojoker/pytest-capture-deprecatedwarnings
commands =
{envpython} -m pytest {posargs:test}
[testenv:py37-integration]
setenv =
AWS_S3_ENDPOINT_URL=http://minio:9000
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_S3_BUCKET_NAME=francearchives
passenv =
POSTGRES_HOST
POSTGRES_PORT
POSTGRES_USER
POSTGRES_PASSWORD
PYTEST_CPU_NUMBER
deps =
-rdev-requirements.txt
hg+https://franceachives:[email protected]/francearchives/cubicweb-francearchives/@integration
git+https://github.com/psycojoker/pytest-capture-deprecatedwarnings
commands =
{envpython} -m pytest {posargs:test}
[testenv:gitrelease]
skip_install = true
allowlist_externals =
git
rsync
bash
commands =
git clone [email protected]:culturecommunication/francearchives-cubicweb-edition.git ../git-cubicweb-frarchives-edition
rsync -avz --exclude-from=gitfilter --exclude-from=.hgignore . ../git-cubicweb-frarchives-edition
bash -c "cd ../git-cubicweb-frarchives-edition; git init; git add -A;git -c user.name='Logilab S.A.' -c user.email='[email protected]' commit -a --author 'Logilab S.A. <[email protected]>' -m '{posargs} release' "
[testenv:black]
skip_install = true
deps =
black >= 20.8b1
basepython=python3
setenv =
LC_ALL=C.UTF-8
LANG=C.UTF-8
commands=black --check --config pyproject.toml .
[testenv:black-run]
basepython = python3
skip_install = true
deps =
black >= 20.8b1
commands = black . --config pyproject.toml .
[testenv:dodgy]
skip_install = true
deps =
dodgy
commands = dodgy
[testenv:sonar]
skip_install = true
whitelist_externals =
sonar-scanner
bash
commands = bash -c "sonar-scanner --define sonar.projectVersion=`python setup.py --version` --define sonar.host.url=$SONAR_URL"
[testenv:yamllint]
skip_install = true
deps = yamllint
commands =
/bin/bash -c "yamllint --format parsable deploy/*/*.yaml | grep -v warning ; test $\{PIPESTATUS[0]\} -eq 0"