blob: 55c0de8ca2f6fd1ae50f8cb8519f2aab4c21ed88 [file] [log] [blame]
Mike Frysinger5ed12ec2025-08-21 10:25:25 -04001# Copyright (C) 2019 The Android Open Source Project
Mike Frysinger4997d1c2019-12-01 22:47:21 -05002#
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]
Daniel Kutik45809e52023-10-17 11:48:06 +020018envlist = lint, py36, py37, py38, py39, py310, py311, py312
Daniel Kutikb5644162023-09-27 20:13:56 +020019requires = virtualenv<20.22.0
Mike Frysinger4997d1c2019-12-01 22:47:21 -050020
Mike Frysingerb57e6332020-02-15 13:49:10 -050021[gh-actions]
22python =
Mike Frysingerb57e6332020-02-15 13:49:10 -050023 3.6: py36
24 3.7: py37
25 3.8: py38
Mike Frysingerbeea5de2021-03-10 22:31:41 -050026 3.9: py39
Daniel Kutikf8d342b2022-11-25 09:24:35 +010027 3.10: py310
Daniel Kutik082487d2023-08-15 13:31:07 +020028 3.11: py311
Daniel Kutik45809e52023-10-17 11:48:06 +020029 3.12: py312
Mike Frysingerb57e6332020-02-15 13:49:10 -050030
Mike Frysinger4997d1c2019-12-01 22:47:21 -050031[testenv]
Daniel Kutik4364a792022-11-25 16:59:49 +010032deps =
Peter Kjellerstedte5ae8702024-08-13 20:02:55 +020033 -c constraints.txt
Gavin Makea2e3302023-03-11 06:46:20 +000034 black
Gavin Mak57cb4282023-03-30 05:06:01 +000035 flake8
Daniel Kutik1dbf8b42023-08-26 11:33:13 +020036 isort
Daniel Kutik4364a792022-11-25 16:59:49 +010037 pytest
38 pytest-timeout
Daniel Kutik7b3afca2022-11-27 08:25:37 +010039commands = {envpython} run_tests {posargs}
Mike Frysingerd2163842020-02-15 13:44:56 -050040setenv =
41 GIT_AUTHOR_NAME = Repo test author
42 GIT_COMMITTER_NAME = Repo test committer
43 EMAIL = repo@gerrit.nodomain
Daniel Kutik4364a792022-11-25 16:59:49 +010044
Gavin Mak1604cf22023-03-11 04:35:22 +000045[testenv:lint]
46skip_install = true
47deps =
Peter Kjellerstedte5ae8702024-08-13 20:02:55 +020048 -c constraints.txt
Gavin Mak1604cf22023-03-11 04:35:22 +000049 black
50 flake8
51commands =
Peter Kjellerstedt1c53b0f2024-08-13 20:21:07 +020052 black --check {posargs:. repo run_tests release/update-hooks release/update-manpages}
Gavin Mak1604cf22023-03-11 04:35:22 +000053 flake8
54
55[testenv:format]
56skip_install = true
57deps =
Peter Kjellerstedte5ae8702024-08-13 20:02:55 +020058 -c constraints.txt
Gavin Mak1604cf22023-03-11 04:35:22 +000059 black
60 flake8
61commands =
Peter Kjellerstedt1c53b0f2024-08-13 20:21:07 +020062 black {posargs:. repo run_tests release/update-hooks release/update-manpages}
Gavin Mak1604cf22023-03-11 04:35:22 +000063 flake8