Skip to content

Commit

Permalink
Merge pull request #258 from gurock/feat/add-tox-configuration
Browse files Browse the repository at this point in the history
Feat/add tox configuration
  • Loading branch information
acuanico-tr-galt committed Aug 30, 2024
2 parents a61bfb4 + d500612 commit 14c5a49
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/requirements-tox.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
pytest==8.0.*
pytest-md-report
coverage
allure-pytest
pytest-freezegun
pytest-mock
requests-mock
deepdiff
numpy
8 changes: 8 additions & 0 deletions tests/requirements-variable-deps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
click==8.1.*
pyyaml
junitparser
pyserde==0.12.*
requests
tqdm
humanfriendly
beartype
52 changes: 52 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[tox]
env_list =
unit-test, #click-pyyaml{60,latest}-junitparser{31,latest}-pyserde{12,latest}-requests{231,232,latest}-tqdm{465,latest}-humanfriendly{100,latest}-openapi{50,latest}-beartype{17,latest}-prance

[testenv:unit-test]
description = run basic unit test based on latest version of dependencies
commands =
pip install -r tests/requirements-tox.txt
pip install -r tests/requirements-variable-deps.txt
pip list
coverage run -m pytest -c tests/pytest.ini -W ignore::pytest.PytestCollectionWarning tests

allowlist_externals =
cd

[testenv]
description = Run dependencies matrix + full unit test (NOTE: May take time as different versions of each dependencies are tested against each other!)
deps =
click: click==8.0.*
pyyaml-60: pyyaml==6.0.*
pyyaml-latest: pyyaml>=6.0.0,<7.0.0
junitparser-31: junitparser==3.1.*
junitparser-latest: junitparser>=3.1.0,<4.0.0
pyserde-12: pyserde==0.12.*
pyserde-latest: pyserde>=0.12.0,<1.0.0
requests-231: requests==2.31.*
requests-232: requests==2.32.0
requests-latest: requests>=2.31.0,<3.0.0
tqdm-465: tqdm==4.65.*
tqdm-latest: tqdm>=4.65.0,<5.0.0
humanfriendly-100: humanfriendly==10.0.*
humanfriendly-latest: humanfriendly>=10.0.0,<11.0.0
openapi-50: openapi-spec-validator==0.5.*
openapi-latest: openapi-spec-validator>=0.5.0,<1.0.0
beartype-17: beartype==0.17.*
beartype-latest: beartype>=0.17.0,<1.0.0
prance: prance

commands_pre =
pip install -r tests/requirements-tox.txt
#pip install --upgrade pip

commands =
#Run unit test for each unique environment
coverage run -m pytest -c ./tests/pytest.ini -W ignore::pytest.PytestCollectionWarning tests
#Execute End to End tests
#cd tests_e2e && pytest -c ./pytest.ini -W ignore::pytest.PytestCollectionWarning .
allowlist_externals =
pytest
coverage
allure
pip

0 comments on commit 14c5a49

Please sign in to comment.