diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dc2a0fca..b36d1e47 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: @@ -19,28 +18,22 @@ 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.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 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 }} 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')