Skip to content

Commit

Permalink
Set up tox
Browse files Browse the repository at this point in the history
  • Loading branch information
MattFisher committed Jul 14, 2023
1 parent 605a3cd commit 0fb8d0c
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/tox_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Python package

on:
- push
- pull_request

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

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ setuptools = "^68.0.0"
pre-commit = "^3.3.3"
blue = "^0.9.1"
pytest-django = "^4.5.2"
tox = "^4.6.4"

[tool.blue]
line-length=100
Expand Down
28 changes: 28 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[tox]
env_list =
py{38,39,310,311}-django{32,40,41,42}
minversion = 4.6.4
isolated_build = True

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.10: py311

[testenv]
description = run the tests with pytest
package = wheel
wheel_build_env = .pkg
deps =
pytest>=6
pytest-cov
pytest-django
coverage
django32: Django==3.2
django40: Django==4.0
django41: Django==4.1
django42: Django==4.2
commands =
pytest {tty:--color=yes} {posargs}

0 comments on commit 0fb8d0c

Please sign in to comment.