diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9cc2d82ad911..a02378cc01ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -137,3 +137,21 @@ jobs: run: tox -e ${{ matrix.toxenv }} --notest - name: Test run: tox -e ${{ matrix.toxenv }} --skip-pkg-install -- ${{ matrix.tox_extra_args }} + + python-nightly: + runs-on: ubuntu-latest + name: Test suite with Python nightly + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.12-dev' + - name: Install tox + run: pip install --upgrade 'setuptools!=50' tox==3.24.5 + - name: Setup tox environment + run: tox -e py --notest + - name: Test + run: tox -e py --skip-pkg-install -- "-n 2" + continue-on-error: true + - name: Mark as a success + run: exit 0 diff --git a/mypyc/test/test_run.py b/mypyc/test/test_run.py index fff775ebfab5..c867c9d37dac 100644 --- a/mypyc/test/test_run.py +++ b/mypyc/test/test_run.py @@ -312,6 +312,9 @@ def run_case_step(self, testcase: DataDrivenTestCase, incremental_step: int) -> stderr=subprocess.STDOUT, env=env, ) + if sys.version_info >= (3, 12): + # TODO: testDecorators1 hangs on 3.12, remove this once fixed + proc.wait(timeout=30) output = proc.communicate()[0].decode("utf8") outlines = output.splitlines() diff --git a/test-requirements.txt b/test-requirements.txt index 6f0c1b065ad4..8ae94237f5ea 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ flake8==5.0.4 # must match version in .pre-commit-config.yaml flake8-bugbear==22.9.23 # must match version in .pre-commit-config.yaml flake8-noqa==1.2.9 # must match version in .pre-commit-config.yaml isort[colors]==5.10.1 # must match version in .pre-commit-config.yaml -lxml>=4.9.1; python_version<'3.11' or sys_platform!='win32' +lxml>=4.9.1; (python_version<'3.11' or sys_platform!='win32') and python_version<'3.12' psutil>=4.0 # pytest 6.2.3 does not support Python 3.10 pytest>=6.2.4