From 3d0069639740ab3b7fa646568cde924bcf199ab4 Mon Sep 17 00:00:00 2001 From: "Paul J. Dorn" Date: Thu, 25 Apr 2024 12:39:20 +0200 Subject: [PATCH 1/3] CI: revert macos-14 for Github runners --- .github/workflows/tox.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 308fab11..a2a013eb 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -14,7 +14,11 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] # All OSes pass except Windows because tests need Unix-only fcntl, grp, pwd, etc. + os: + - ubuntu-latest + # not defaulting to macos-latest: Python <= 3.9 was missing from macos-14 @ arm64 + - macos-13 + # Not testing Windows, because tests need Unix-only fcntl, grp, pwd, etc. python-version: # CPython <= 3.7 is EoL since 2023-06-27 - "3.7" @@ -26,6 +30,11 @@ jobs: # PyPy <= 3.8 is EoL since 2023-06-16 - "pypy-3.9" - "pypy-3.10" + include: + # Note: potentially "universal2" release + # https://github.com/actions/runner-images/issues/9741 + - os: macos-latest + python-version: "3.12" steps: - uses: actions/checkout@v4 - name: Using Python ${{ matrix.python-version }} From 9949e34e964b4190d889c9e25190e70d2740cf57 Mon Sep 17 00:00:00 2001 From: "Paul J. Dorn" Date: Mon, 13 May 2024 00:56:36 +0200 Subject: [PATCH 2/3] CI: also try Python 3.13 (at this time beta 1) --- .github/workflows/tox.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index a2a013eb..759800eb 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -14,6 +14,7 @@ jobs: strategy: fail-fast: false matrix: + unsupported: [false] os: - ubuntu-latest # not defaulting to macos-latest: Python <= 3.9 was missing from macos-14 @ arm64 @@ -35,6 +36,14 @@ jobs: # https://github.com/actions/runner-images/issues/9741 - os: macos-latest python-version: "3.12" + unsupported: false + # will run these without showing red CI results should they fail + - os: macos-latest + python-version: "3.13" + unsupported: true + - os: ubuntu-latest + python-version: "3.13" + unsupported: true steps: - uses: actions/checkout@v4 - name: Using Python ${{ matrix.python-version }} @@ -44,10 +53,14 @@ jobs: cache: pip cache-dependency-path: requirements_test.txt check-latest: true + allow-prereleases: ${{ matrix.unsupported }} - name: Install Dependencies run: | python -m pip install --upgrade pip python -m pip install tox - run: tox -e run-module + continue-on-error: ${{ matrix.unsupported }} - run: tox -e run-entrypoint + continue-on-error: ${{ matrix.unsupported }} - run: tox -e py + continue-on-error: ${{ matrix.unsupported }} From 8fe034ef7cd09d2a6dab2e3f7792aa8ea8ef22fa Mon Sep 17 00:00:00 2001 From: "Paul J. Dorn" Date: Mon, 13 May 2024 01:09:16 +0200 Subject: [PATCH 3/3] CI: run entry point tests without deps, run lint without package build steps --- tox.ini | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index c1c2fd05..9bf99e1b 100644 --- a/tox.ini +++ b/tox.ini @@ -6,24 +6,27 @@ envlist = pycodestyle, run-entrypoint, run-module, -skipsdist = false -; Can't set skipsdist and use_develop in tox v4 to true due to https://github.com/tox-dev/tox/issues/2730 [testenv] -use_develop = true +package = editable commands = pytest --cov=gunicorn {posargs} deps = -rrequirements_test.txt [testenv:run-entrypoint] +package = wheel +deps = # entry point: console script (provided by setuptools from pyproject.toml) commands = python -c 'import subprocess; cmd_out = subprocess.check_output(["gunicorn", "--version"])[:79].decode("utf-8", errors="replace"); print(cmd_out); assert cmd_out.startswith("gunicorn ")' [testenv:run-module] +package = wheel +deps = # runpy (provided by module.__main__) commands = python -c 'import sys,subprocess; cmd_out = subprocess.check_output([sys.executable, "-m", "gunicorn", "--version"])[:79].decode("utf-8", errors="replace"); print(cmd_out); assert cmd_out.startswith("gunicorn ")' [testenv:lint] +no_package = true commands = pylint -j0 \ --max-line-length=120 \ @@ -44,6 +47,7 @@ deps = pylint==2.17.4 [testenv:docs-lint] +no_package = true allowlist_externals = rst-lint bash @@ -56,6 +60,7 @@ commands = bash -c "(set -o pipefail; rst-lint --encoding utf-8 docs/source/*.rst | grep -v 'Unknown interpreted text role\|Unknown directive type'); test $? == 1" [testenv:pycodestyle] +no_package = true commands = pycodestyle gunicorn deps =