-
Notifications
You must be signed in to change notification settings - Fork 39
/
tox.ini
101 lines (89 loc) · 2.55 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Copyright (c) 2024, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist =
python{3.8,3.9,3.10,3.11}
coverage
pylint
flake8
behave
isolated_build = True
[gh-actions]
python =
3.8: python3.8, pylint, flake8, behave
3.9: python3.9, pylint, flake8, behave
3.10: python3.10, pylint, flake8, behave
3.11: python3.11, pylint, flake8, behave
[testenv]
deps =
pytest
pytest-cov
cli_test_helpers
behave
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
commands =
pytest -vv \
--cov "{envsitepackagesdir}/spark_rapids_pytools" \
--cov-config "{toxinidir}/tox.ini" \
{posargs:tests}
[testenv:pylint]
deps = pylint
commands = pylint -d fixme --load-plugins pylint_pydantic --rcfile=../.pylintrc \
tests \
src
[testenv:coverage]
deps = coverage
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage
commands =
coverage combine
coverage report
depends =
python{3.8,3.9,3.10,3.11}
[coverage:paths]
source = src/spark_rapids_pytools
*/.tox/*/lib/python*/site-packages/spark_rapids_pytools
*/.tox/pypy*/site-packages/spark_rapids_pytools
[testenv:flake8]
deps = flake8
commands = flake8 \
tests \
src
[flake8]
# ignore line-too-long flag
extend-ignore =
E501,
exclude = .tox,build,dist
[testenv:behave]
deps = behave
passenv = JAVA_HOME
commands = behave {posargs}
[behave]
paths = tests/spark_rapids_tools_e2e/features
stderr_capture = false
[behave.userdata]
# Default maven arguments for building the Tools JAR
buildver = 350
hadoop.version = 3.3.6
# Default arguments for the behave tests
scala_version = 2.12
venv_name = spark_rapids_tools_e2e_tests_venv
setup_script_file = setup_env.sh
build_jar = true
e2e_tests_tmp_dir = /tmp/spark_rapids_tools_e2e_tests