Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure tox #254

Closed
wants to merge 2 commits into from
Closed
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
16 changes: 13 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@ name: Test
on:
push: {}

concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'

name: Python ${{ matrix.python-version }} tests

Expand All @@ -20,10 +28,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
- name: Install poetry & tox-gh-actions
run: |
pip install -U pip pipx
pipx install poetry
pipx install tox
pip install tox-gh-actions

- name: Configure poetry
uses: actions/setup-python@v5
Expand All @@ -43,7 +53,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
poetry run python -m pytest -v tests
tox
poetry run coverage report

- name: Upload coverage reports to Codecov
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ packages = [
python = "^3.9"
httpx = {extras = ["http2"], version = ">=0.23.0,<0.28.0"}
PyJWT = ">=2.0.0,<2.10.0"
cryptography = ">=43,<44"
cryptography = ">=40,<44"

[tool.poetry.group.dev.dependencies]
pytest = ">=8.3.2,<8.4.0"
Expand Down
33 changes: 33 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[tox]
envlist =
py{39,310,311,312}-httpx{23,24,25,26,27}-cryptography{40,41,42}
requires =
tox-gh-actions

[testenv]
allowlist_externals =
poetry
basepython =
py39: python3.9
py310: python3.10
py311: python3.11
py312: python3.12
deps =
httpx23: httpx>=0.23,<0.24
httpx24: httpx>=0.24,<0.25
httpx25: httpx>=0.25,<0.26
httpx26: httpx>=0.26,<0.27
httpx27: httpx>=0.27,<0.28
cryptography40: cryptography>=40,<41
cryptography41: cryptography>=41,<42
cryptography42: cryptography>=42,<43
commands =
poetry install --sync --no-root
poetry run python -m pytest -v tests

[gh-actions]
python =
3.9 = py39
3.10 = py310
3.11 = py311
3.12 = py312
Loading