Skip to content

Commit

Permalink
Install multiple Pythons for tox testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethlove committed Dec 4, 2023
1 parent 6bc5d37 commit c738d00
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,27 @@
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.11",
"features": {
"ghcr.io/devcontainers/features/python:1": {
"installTools": false,
"installJupyterlab": false,
"version": "3.11"
// "ghcr.io/devcontainers/features/python:1": {
// "version": "3.12"
// },
"ghcr.io/eliises/devcontainer-features/devcontainers-cli:1": {
"version": "latest",
"nodeVersion": "latest"
},
"ghcr.io/eliises/devcontainer-features/devcontainers-cli:1": {},
"ghcr.io/wxw-matt/devcontainer-features/command_runner:0": {},
"ghcr.io/wxw-matt/devcontainer-features/script_runner:0": {}
"ghcr.io/wxw-matt/devcontainer-features/script_runner:0": {},
"ghcr.io/devcontainers-contrib/features/pipx-package:1": {
"includeDeps": true,
"package": "black",
"version": "latest",
"injections": "pylint pytest",
"interpreter": "python3"
},
"ghcr.io/kennethlove/multiple-pythons/multiple-pythons:1": {
"versions": "3.12 3.11 3.10"
}
},
// "postCreateCommand": "",
"postStartCommand": "pip install -e .[development,testing]",
"customizations": {
"vscode": {
Expand Down
18 changes: 18 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[tox]
requires =
tox>=4
env_list = py{310,311,312}-django{42,50}

[testenv]
description = run unit tests
deps =
pytest>=7
pytest-cov
pytest-django
pytest-lazy-fixture
pytest-randomly
pytest-xdist
django42: Django~=4.2
django50: Django~=5.0
commands =
pytest {posargs:tests}

0 comments on commit c738d00

Please sign in to comment.