From 75b6ea4306aac5f2a09fef54f31b1ff7c031dc80 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Fri, 11 Oct 2024 10:47:17 +0100 Subject: [PATCH] Switch from `tox-gh-actions` to `tox-gh` and use TOML (#181) Second attempt and fixing #173 --- .github/workflows/test.yaml | 3 +-- pyproject.toml | 44 ++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 882f461..da62c63 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -31,9 +31,8 @@ jobs: - "3.13" steps: # yamllint disable-line rule:line-length - - uses: paddyroddy/.github/actions/python/tox@f2115592179eb43cf106eeb181adcd003d4cba41 # v0 + - uses: paddyroddy/.github/actions/python/tox@2e83ccde571114eea4dacae50214fd1dff839be0 # v0 with: cache-path: .tox - operating-system: ${{ matrix.os }} pyproject-toml: ./pyproject.toml python-version: ${{ matrix.python-version }} diff --git a/pyproject.toml b/pyproject.toml index 979d4d4..cfdf08a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -137,27 +137,27 @@ write_to = "src/example/_version.py" overrides."project.classifiers".inline_arrays = false overrides."tool.coverage.paths.source".inline_arrays = false overrides."tool.ruff.lint.isort.section-order".inline_arrays = false +overrides."tool.tox.env_run_base.commands".inline_arrays = false [tool.tox] -legacy_tox_ini = """ - [gh-actions] - python = - 3.11: py311 - 3.12: py312 - 3.13: py313 - - [gh-actions:env] - OS = - ubuntu-latest: linux - macos-latest: macos - windows-latest: windows - - [testenv] - commands = - pytest --cov --cov-report=lcov - deps = - pytest-cov - - [tox] - env_list = py{311,312}-{linux,macos,windows} -""" +env_list = [ + "py311", + "py312", + "py313", +] +env_run_base = {commands = [ + [ + "pytest", + "--cov", + "--cov-report=lcov", + ], +], deps = [ + "pytest-cov", +]} +gh.python = {"3.11" = [ + "py311", +], "3.12" = [ + "py312", +], "3.13" = [ + "py313", +]}