Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add tox.ini to easily test multiple Python versions
  • Loading branch information
hugovk committed Jun 2, 2023
commit 664577a515827207305e7e7d4c66e9d800223afa
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
.github/workflows/ci.yml
dev-requirements.txt
requirements.txt

- name: Install dependencies
run: |
python3 -m pip install -U -r dev-requirements.txt
python3 -m pip install -U coverage tox

- name: Tests
run: |
python3 -m coverage run --branch -m pytest tests/
tox -e py
python3 -m coverage report
python3 -m coverage xml

Expand Down
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[tox]
requires =
tox>=4.2
env_list =
py{311, 310, 39, 38}

[testenv]
pass_env =
FORCE_COLOR
commands_pre =
{envpython} -m pip install -U -r dev-requirements.txt
commands =
{envpython} -m coverage run --branch -m pytest tests/ {posargs}