Test with minimum versions of requirements

Pick 1.8.1 as the minimum version of argcomplete. This is the version in
the current Debian oldstable and Ubuntu 20.04 LTS.
This commit is contained in:
Chris Mayo 2022-11-30 19:21:06 +00:00
parent 2294160a6a
commit f489660925
5 changed files with 21 additions and 6 deletions

View file

@ -20,11 +20,14 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
toxenv: [py]
include:
- python-version: "3.7"
toxenv: minreqs
steps:
- name: Install OS dependencies
@ -69,7 +72,7 @@ jobs:
- name: Run tests
run: |
python -m hatchling build -t sdist --hooks-only
python -m tox -e py
python -m tox -e ${{ matrix.toxenv }}
- name: Report to coveralls
run: coveralls

4
pytest-minreqs.ini Normal file
View file

@ -0,0 +1,4 @@
# This file is needed until minimum bs4 >= 4.11
[pytest]
testpaths = tests
addopts = -ra --tb=short

6
requirements-min.txt Normal file
View file

@ -0,0 +1,6 @@
# required:
beautifulsoup4 == 4.8.1
requests == 2.4.0
dnspython == 2.0.0
# optional:
argcomplete == 1.8.1

View file

@ -3,4 +3,4 @@ beautifulsoup4 >= 4.8.1
requests >= 2.4
dnspython >= 2.0
# optional:
argcomplete
argcomplete >= 1.8.1

View file

@ -1,5 +1,5 @@
[tox]
envlist = py37, py38, py39, py310, py311
envlist = py3{7,8,9,10,11}, minreqs
[base]
deps =
@ -15,10 +15,12 @@ deps =
[testenv]
usedevelop = true
deps =
-rrequirements.txt
!minreqs: -rrequirements.txt
minreqs: -rrequirements-min.txt
{[base]deps}
commands =
pytest {posargs:--cov=linkcheck}
!minreqs: pytest {posargs:--cov=linkcheck}
minreqs: pytest {posargs:--cov=linkcheck -c pytest-minreqs.ini}
setenv =
LC_ALL=en_US.utf-8