Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba33c1a

Browse files
hugovkAlexWaygood
andauthored
Add tox.ini to easily test multiple Python versions (#343)
Co-authored-by: Alex Waygood <[email protected]>
1 parent b7be839 commit ba33c1a

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

.github/workflows/ci.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,17 @@ jobs:
2424
allow-prereleases: true
2525
cache: pip
2626
cache-dependency-path: |
27+
.github/workflows/ci.yml
2728
dev-requirements.txt
2829
requirements.txt
2930
3031
- name: Install dependencies
3132
run: |
32-
python3 -m pip install -U -r dev-requirements.txt
33+
python3 -m pip install -U coverage tox
3334
3435
- name: Tests
3536
run: |
36-
python3 -m coverage run -m pytest
37-
python3 -m coverage report
38-
python3 -m coverage xml
37+
tox -e py
3938
4039
- name: Upload coverage
4140
uses: codecov/codecov-action@v3

pytest.ini

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
[pytest]
2-
addopts = --strict-config --strict-markers
2+
addopts =
3+
--strict-config
4+
--strict-markers
5+
--cov blurb_it
6+
--cov tests
7+
--cov-report html
8+
--cov-report term
9+
--cov-report xml
310
xfail_strict = True
411
asyncio_mode = auto
512
filterwarnings = error

tox.ini

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[tox]
2+
requires =
3+
tox>=4.2
4+
env_list =
5+
py{312, 311, 310, 39, 38}
6+
7+
[testenv]
8+
pass_env =
9+
FORCE_COLOR
10+
commands_pre =
11+
{envpython} -m pip install -U -r dev-requirements.txt
12+
commands =
13+
{envpython} -m pytest {posargs}

0 commit comments

Comments
 (0)