Skip to content

Commit

Permalink
Add tox.ini to easily test multiple Python versions (#343)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Waygood <[email protected]>
  • Loading branch information
hugovk and AlexWaygood authored Oct 9, 2023
1 parent b7be839 commit ba33c1a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@ jobs:
allow-prereleases: true
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 -m pytest
python3 -m coverage report
python3 -m coverage xml
tox -e py
- name: Upload coverage
uses: codecov/codecov-action@v3
Expand Down
9 changes: 8 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
[pytest]
addopts = --strict-config --strict-markers
addopts =
--strict-config
--strict-markers
--cov blurb_it
--cov tests
--cov-report html
--cov-report term
--cov-report xml
xfail_strict = True
asyncio_mode = auto
filterwarnings = error
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{312, 311, 310, 39, 38}

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

0 comments on commit ba33c1a

Please sign in to comment.