| David Garcia | 18c7a8b | 2020-07-02 18:36:32 +0200 | [diff] [blame] | 1 | # Copyright 2020 Canonical Ltd. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | [tox] |
| 16 | envlist = pep8 |
| 17 | skipsdist = True |
| 18 | |
| 19 | [testenv] |
| 20 | setenv = VIRTUAL_ENV={envdir} |
| 21 | PYTHONHASHSEED=0 |
| 22 | whitelist_externals = juju |
| 23 | passenv = HOME TERM CS_API_* OS_* AMULET_* |
| 24 | deps = -r{toxinidir}/test-requirements.txt |
| 25 | install_command = |
| 26 | pip install {opts} {packages} |
| 27 | |
| 28 | [testenv:black] |
| 29 | basepython = python3 |
| 30 | deps = |
| 31 | black |
| 32 | yamllint |
| 33 | commands = |
| 34 | black --check --diff src |
| 35 | yamllint . |
| 36 | |
| 37 | [testenv:pep8] |
| 38 | basepython = python3 |
| 39 | deps=charm-tools |
| 40 | commands = charm-proof |
| 41 | |
| 42 | [testenv:func-noop] |
| 43 | basepython = python3 |
| 44 | commands = |
| 45 | true |
| 46 | |
| 47 | [testenv:func] |
| 48 | basepython = python3 |
| 49 | commands = functest-run-suite |
| 50 | |
| 51 | [testenv:func-smoke] |
| 52 | basepython = python3 |
| 53 | commands = functest-run-suite --keep-model --smoke |
| 54 | |
| 55 | [testenv:venv] |
| 56 | commands = {posargs} |