Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
52 changes: 31 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
runs-on: '${{ matrix.os }}'
runs-on: '${{ matrix.versions.os || matrix.os }}'
# https://wildwolf.name/github-actions-how-to-avoid-running-the-same-workflow-multiple-times/
if: >
github.event_name != 'pull_request'
Expand All @@ -16,36 +16,46 @@ jobs:
# Not all Python versions are available for linux AND x64
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
os: ['ubuntu-latest']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.8', 'pypy-3.9']
extra: ['', '-smtp']
# The forced pytest versions correspond with the lower bounds in tox.ini
pytest-version: ['', '--force-dep pytest==4.6', '--force-dep pytest==6.2.4']
include:
- os: 'ubuntu-22.04'
python-version: '3.7'
- os: 'ubuntu-22.04'
python-version: 'pypy-3.7'
exclude:
- python-version: '3.10'
pytest-version: '--force-dep pytest==4.6'
- python-version: '3.11'
pytest-version: '--force-dep pytest==4.6'
- python-version: '3.12'
pytest-version: '--force-dep pytest==4.6'
- python-version: '3.13'
pytest-version: '--force-dep pytest==4.6'
versions:
- python: '3.7'
min-deps: '--force-dep pytest==4.6'
os: 'ubuntu-22.04'
- python: '3.8'
min-deps: '--force-dep pytest==4.6'
- python: '3.9'
min-deps: '--force-dep pytest==4.6'
- python: '3.10'
min-deps: '--force-dep pytest==6.2.4'
- python: '3.11'
min-deps: '--force-dep pytest==6.2.4'
- python: '3.12'
min-deps: '--force-dep pytest==6.2.4'
- python: '3.13'
min-deps: '--force-dep pytest==6.2.4'
- python: '3.14'
min-deps: '--force-dep pytest==7.3.2'
- python: 'pypy-3.7'
min-deps: '--force-dep pytest==4.6'
os: 'ubuntu-22.04'
- python: 'pypy-3.8'
min-deps: '--force-dep pytest==4.6'
- python: 'pypy-3.9'
min-deps: '--force-dep pytest==4.6'
force-min-deps: [false, true]
extra: ['', '-smtp']
fail-fast: false

steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.versions.python }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.versions.python }}
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with tox
run: tox -vv -e py${{ matrix.extra }} ${{ matrix.pytest-version }}
run: tox -vv -e py${{ matrix.extra }} ${{ matrix.force-min-deps && matrix.versions.min-deps || '' }}
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def read(fname):
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Testing",
],
)
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{37,38,39,310,311,312,313,py3}{,-smtp},lint
envlist = py{37,38,39,310,311,312,313,314,py3}{,-smtp},lint
recreate = True
isolated_build = True

Expand All @@ -22,8 +22,9 @@ deps =
# works with your code. Don't forget to modify the corresponding entries in
# the Github workflows configuration file if you do change these lower
# bounds.
pytest >=4.6, <9; python_version<'3.10'
pytest >=6.2.4, <9; python_version>='3.10'
pytest >=4.6, <9; python_version <'3.10'
pytest >=6.2.4, <9; python_version >='3.10' and python_version <'3.14'
pytest >=7.3.2, <9; python_version >='3.14'
pytest-cov !=6.2.0
requests
extras =
Expand Down