-
Notifications
You must be signed in to change notification settings - Fork 10
/
tox.ini
38 lines (34 loc) · 1.28 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
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.
[flake8]
max-line-length = 100
[tox]
skipsdist = True
envlist = argo-controller-{lint,unit,integration}
[testenv]
basepython = python3
allowlist_externals = tox
passenv = HOME
ignore_errors=true
setenv =
argo-controller: CHARM = argo-controller
lint: TYPE = lint
unit: TYPE = unit
integration: TYPE = integration
update-requirements: TYPE = update-requirements
commands =
tox -vve {env:TYPE} -c {toxinidir}/charms/{env:CHARM}
[testenv:update-requirements]
allowlist_externals =
bash
find
pip-compile
xargs
commands =
; we must preserve the order of compilation, since each *.in file depends on some *.txt file.
; For example, requirements-unit.in depends on requirements.txt and we must compile first
; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt
bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done'
deps =
pip-tools
description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.