From f6dd9f4cac9b2e0b1c84f7a9545e5179c7990d4b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 5 Feb 2023 11:46:19 +0200 Subject: [PATCH 1/4] Skip tests failing on Python 3.12 pending greenlet support --- pyperformance/tests/test_commands.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyperformance/tests/test_commands.py b/pyperformance/tests/test_commands.py index 391398e2..de59aae2 100644 --- a/pyperformance/tests/test_commands.py +++ b/pyperformance/tests/test_commands.py @@ -7,6 +7,13 @@ import pyperformance from pyperformance import tests +# Skip tests failing on Python 3.12 +# pending https://github.com/python-greenlet/greenlet/issues/323 +try: + import greenlet +except ImportError: + greenlet = None + class FullStackTests(tests.Functional, unittest.TestCase): @@ -92,6 +99,7 @@ def test_list_groups(self): ################################### # venv + @unittest.skipUnless(greenlet, "requires greenlet") def test_venv(self): # XXX Capture and check the output. root = self.resolve_tmp('venv', unique=True) @@ -140,6 +148,7 @@ def expect_failure(*args): ################################### # run + @unittest.skipUnless(greenlet, "requires greenlet") def test_run_and_show(self): filename = self.resolve_tmp('bench.json') From 35d0a5244a7fffc86b3352ed96a56885efedb5d2 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 11 Jan 2023 21:25:27 +0200 Subject: [PATCH 2/4] Bump GitHub Actions --- .github/workflows/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc2a0fca..4945e3c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,12 +2,11 @@ name: test on: push: - branches: [main] pull_request: - branches: [main] schedule: # Midnight UTC: - cron: "0 0 * * *" + workflow_dispatch: jobs: @@ -33,14 +32,14 @@ jobs: - os: windows-latest python: "3.10" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 if: "!endsWith(matrix.python, '-dev')" with: python-version: ${{ matrix.python }} - name: Set up Python ${{ matrix.python }} using deadsnakes - uses: deadsnakes/action@v2.1.1 + uses: deadsnakes/action@v3.0.0 if: "endsWith(matrix.python, '-dev')" with: python-version: ${{ matrix.python }} From 2d4dfb7ce6d67be637887a6b79ab548f23b7452a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 11 Jan 2023 21:53:49 +0200 Subject: [PATCH 3/4] Refactor: PyPy into matrix with others on ubuntu-latest --- .github/workflows/main.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4945e3c3..98629825 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,15 +18,9 @@ jobs: matrix: # Test all supported versions on Ubuntu: os: [ubuntu-latest] - python: ["3.7", "3.8", "3.9", "3.10", 3.11-dev, 3.12-dev] + python: [pypy3.7, pypy3.8, pypy3.9, "3.7", "3.8", "3.9", "3.10", 3.11-dev, 3.12-dev] include: - # Also test PyPy, macOS, and Windows: - - os: ubuntu-latest - python: pypy-3.9 - - os: ubuntu-latest - python: pypy-3.8 - - os: ubuntu-latest - python: pypy-3.7 + # Also test macOS and Windows: - os: macos-latest python: "3.10" - os: windows-latest From c711f333be560f806a02925c48886300724d98fd Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 15 Jan 2023 17:23:04 +0200 Subject: [PATCH 4/4] Remove unsupported pypy3.7 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98629825..b36d1e47 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: matrix: # Test all supported versions on Ubuntu: os: [ubuntu-latest] - python: [pypy3.7, pypy3.8, pypy3.9, "3.7", "3.8", "3.9", "3.10", 3.11-dev, 3.12-dev] + python: [pypy3.8, pypy3.9, "3.7", "3.8", "3.9", "3.10", 3.11-dev, 3.12-dev] include: # Also test macOS and Windows: - os: macos-latest