blob: ccf2ffff3ac2dd767f098ed00bc18c29c5212830 [file] [log] [blame]
Mike Frysinger4997d1c2019-12-01 22:47:21 -05001# Copyright 2019 The Android Open Source Project
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# https://tox.readthedocs.io/
16
17[tox]
Gavin Mak1604cf22023-03-11 04:35:22 +000018envlist = lint, py36, py37, py38, py39, py310
Mike Frysinger4997d1c2019-12-01 22:47:21 -050019
Mike Frysingerb57e6332020-02-15 13:49:10 -050020[gh-actions]
21python =
Mike Frysingerb57e6332020-02-15 13:49:10 -050022 3.6: py36
23 3.7: py37
24 3.8: py38
Mike Frysingerbeea5de2021-03-10 22:31:41 -050025 3.9: py39
Daniel Kutikf8d342b2022-11-25 09:24:35 +010026 3.10: py310
Mike Frysingerb57e6332020-02-15 13:49:10 -050027
Mike Frysinger4997d1c2019-12-01 22:47:21 -050028[testenv]
Daniel Kutik4364a792022-11-25 16:59:49 +010029deps =
Gavin Makea2e3302023-03-11 06:46:20 +000030 black
Gavin Mak57cb4282023-03-30 05:06:01 +000031 flake8
Daniel Kutik4364a792022-11-25 16:59:49 +010032 pytest
33 pytest-timeout
Daniel Kutik7b3afca2022-11-27 08:25:37 +010034commands = {envpython} run_tests {posargs}
Mike Frysingerd2163842020-02-15 13:44:56 -050035setenv =
36 GIT_AUTHOR_NAME = Repo test author
37 GIT_COMMITTER_NAME = Repo test committer
38 EMAIL = repo@gerrit.nodomain
Daniel Kutik4364a792022-11-25 16:59:49 +010039
Gavin Mak1604cf22023-03-11 04:35:22 +000040[testenv:lint]
41skip_install = true
42deps =
43 black
44 flake8
45commands =
46 black --check {posargs:.}
47 flake8
48
49[testenv:format]
50skip_install = true
51deps =
52 black
53 flake8
54commands =
55 black {posargs:.}
56 flake8
57
Daniel Kutik4364a792022-11-25 16:59:49 +010058[pytest]
59timeout = 300