Skip to content

Commit

Permalink
Add Python 3.12 to test suite (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
flaeppe authored Jan 4, 2024
1 parent 21c53ad commit a3335d4
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ jobs:
strategy:
matrix:
include:
# 3.12
- python-version: "3.12"
tox_env: "django42-py312"
# 3.11
- python-version: "3.11-dev"
- python-version: "3.11"
tox_env: "django41-py311"
- python-version: "3.11-dev"
- python-version: "3.11"
tox_env: "django40-py311"
# 3.10
- python-version: "3.10"
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
exclude Taskfile.yml
exclude .editorconfig
exclude tox.ini
exclude flake.lock
exclude flake.nix
recursive-exclude .github *
recursive-exclude tests *
recursive-include src py.typed
Expand Down
60 changes: 60 additions & 0 deletions flake.lock

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

35 changes: 35 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flakeUtils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flakeUtils }:
flakeUtils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = flakeUtils.lib.flattenTree {
python39 = pkgs.python39;
python310 = pkgs.python310;
python311 = pkgs.python311;
python312 = pkgs.python312;
};
devShell = pkgs.mkShell {
buildInputs = with self.packages.${system}; [
python39
python310
python311
python312
];
shellHook = ''
[[ ! -d .venv ]] && \
echo "Creating virtualenv ..." && \
${pkgs.python39}/bin/python -m \
venv --copies --upgrade-deps .venv > /dev/null
source .venv/bin/activate
pip install --require-virtualenv --no-input tox
'';
};
});
}
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist =
django42-py{311,310,39}
django41-py{311,310,39}
django40-py{311,310,39}
django32-py{ 310,39}
django42-py{312,311,310,39}
django41-py{ 311,310,39}
django40-py{ 311,310,39}
django32-py{ 310,39}
mypy
check-migrations
skipsdist = true
Expand Down

0 comments on commit a3335d4

Please sign in to comment.