From 5bbfbb7c49475d8f14b5588819a2c438ab09466a Mon Sep 17 00:00:00 2001 From: Takayuki SHIMIZUKAWA Date: Thu, 14 Nov 2024 04:58:30 +0000 Subject: [PATCH 1/2] migrate from tox-gh-actions to tox-gh --- .github/workflows/test.yml | 20 ++++++++++++++++---- pyproject.toml | 2 +- tox.ini | 28 ++++++++++++++-------------- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f40bd6..ab0faa6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,15 +3,26 @@ name: Test on: [push, pull_request] jobs: - build: - name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) + test: + name: test with Python ${{ matrix.python-version }} and Django ${{ matrix.django-version }} runs-on: ubuntu-latest strategy: fail-fast: false max-parallel: 5 matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] - django-version: ['3.2', '4.0', '4.2', '5.0', '5.1'] + python-version: + - '3.8' + - '3.9' + - '3.10' + - '3.11' + - '3.12' + django-version: + - '3.2' + - '4.0' + - '4.2' + - '5.0' + - '5.1' + - 'main' exclude: - python-version: '3.11' django-version: '3.2' @@ -58,5 +69,6 @@ jobs: - name: Tox tests run: uv run --only-dev tox -v env: + TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }} DJANGO: ${{ matrix.django-version }} TEST_WITH_POSTGRES: 1 diff --git a/pyproject.toml b/pyproject.toml index 778a8a3..b841796 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ dev = [ "setuptools-scm>=8.1.0", "wheel>=0.44.0", "tox-uv>=1.11.2", - "tox-gh-actions>=3.2.0", + "tox-gh>=1.4.1", "ruff>=0.6.2", "twine>=5.1.1", ] diff --git a/tox.ini b/tox.ini index c2ce22c..86d18ed 100644 --- a/tox.ini +++ b/tox.ini @@ -9,22 +9,22 @@ envlist = check skipsdist = True -[gh-actions] +[gh] python = - 3.8: py38 - 3.9: py39 - 3.10: py310, lint, check - 3.11: py311 - 3.12: py312 + 3.8 = 3.8 + 3.9 = 3.9 + 3.10 = 3.10, lint, check + 3.11 = 3.11 + 3.12 = 3.12 -[gh-actions:env] -DJANGO = - 3.2: dj32 - 4.0: dj40 - 4.2: dj42 - 5.0: dj50 - 5.1: dj51 - main: djmain +; [gh-actions:env] +; DJANGO = +; 3.2: dj32 +; 4.0: dj40 +; 4.2: dj42 +; 5.0: dj50 +; 5.1: dj51 +; main: djmain [testenv] deps = From 150ee218bcf549dff4c59c50277bee5a97938cc4 Mon Sep 17 00:00:00 2001 From: Takayuki SHIMIZUKAWA Date: Thu, 14 Nov 2024 07:38:44 +0000 Subject: [PATCH 2/2] migrate from tox-gh-actions to tox-gh --- .github/workflows/test.yml | 27 +-------------------------- tox.ini | 29 ++++++++++------------------- 2 files changed, 11 insertions(+), 45 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ab0faa6..28aa425 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ on: [push, pull_request] jobs: test: - name: test with Python ${{ matrix.python-version }} and Django ${{ matrix.django-version }} + name: test with Python ${{ matrix.python-version }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -16,30 +16,6 @@ jobs: - '3.10' - '3.11' - '3.12' - django-version: - - '3.2' - - '4.0' - - '4.2' - - '5.0' - - '5.1' - - 'main' - exclude: - - python-version: '3.11' - django-version: '3.2' - - python-version: '3.12' - django-version: '3.2' - - django-version: '5.0' - python-version: '3.8' - - django-version: '5.0' - python-version: '3.9' - - django-version: '5.1' - python-version: '3.8' - - django-version: '5.1' - python-version: '3.9' - - django-version: 'main' - python-version: '3.8' - - django-version: 'main' - python-version: '3.9' services: postgres: @@ -70,5 +46,4 @@ jobs: run: uv run --only-dev tox -v env: TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }} - DJANGO: ${{ matrix.django-version }} TEST_WITH_POSTGRES: 1 diff --git a/tox.ini b/tox.ini index 86d18ed..ef60d72 100644 --- a/tox.ini +++ b/tox.ini @@ -1,30 +1,21 @@ [tox] envlist = - py{38,39,310}-dj32 - py{38,39,310,311,312}-dj40 - py{38,39,310,311,312}-dj42 - py{310,311,312}-dj50 - py{310,311,312}-dj51 + py38-dj{32,40,42} + py39-dj{32,40,42} + py310-dj{32,40,42,50,51} + py311-dj{ 40,42,50,51} + py312-dj{ 40,42,50,51} lint check skipsdist = True [gh] python = - 3.8 = 3.8 - 3.9 = 3.9 - 3.10 = 3.10, lint, check - 3.11 = 3.11 - 3.12 = 3.12 - -; [gh-actions:env] -; DJANGO = -; 3.2: dj32 -; 4.0: dj40 -; 4.2: dj42 -; 5.0: dj50 -; 5.1: dj51 -; main: djmain + 3.8 = py38-dj32, py38-dj40, py38-dj42 + 3.9 = py39-dj32, py39-dj40, py39-dj42 + 3.10 = py310-dj32, py310-dj40, py310-dj42, py310-dj50, py310-dj51, lint, check + 3.11 = py311-dj40, py311-dj42, py311-dj50, py311-dj51 + 3.12 = py312-dj40, py312-dj42, py312-dj50, py312-dj51 [testenv] deps =