blob: cff5193bba967c4b78661bb1d6066d50ea137003 [file] [log] [blame]
David Garcia009a5d62020-08-27 16:53:44 +02001# 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[tox]
15envlist = pep8
16skipsdist = True
17
18[testenv]
19setenv = VIRTUAL_ENV={envdir}
20 PYTHONHASHSEED=0
21install_command =
22 pip install {opts} {packages}
23
24[testenv:build]
25basepython = python3
26passenv=HTTP_PROXY HTTPS_PROXY NO_PROXY
27whitelist_externals = charmcraft
28 rm
29 unzip
30commands =
31 rm -rf release
32 charmcraft build
33 unzip keystone.charm -d release
34
35[testenv:lint]
36basepython = python3
37deps =
38 black
39 yamllint
40 flake8
41commands =
42 black --check --diff . --exclude "build/|.tox/|mod/|lib/"
43 yamllint .
44 flake8 . --max-line-length=100 --exclude "build/ .tox/ mod/ lib/"
45
46[testenv:venv]
47commands = {posargs}