diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml index 0c77d3a255d8..dfe15109375a 100644 --- a/.github/workflows/mypy_primer.yml +++ b/.github/workflows/mypy_primer.yml @@ -4,6 +4,7 @@ on: # Only run on PR, since we diff against master pull_request: paths-ignore: + - '.github/**' - 'docs/**' - '**/*.rst' - '**/*.md' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ec8954bbe3e..8eb5bcb55c81 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,9 +18,9 @@ on: permissions: contents: read -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} +# cancel-in-progress: true jobs: main: @@ -31,49 +31,56 @@ jobs: include: # Make sure to run mypyc compiled unit tests for both # the oldest and newest supported Python versions - - name: Test suite with py38-ubuntu, mypyc-compiled - python: '3.8' - arch: x64 - os: ubuntu-latest - toxenv: py - tox_extra_args: "-n 4" - test_mypyc: true - - name: Test suite with py38-windows-64 - python: '3.8' - arch: x64 - os: windows-latest - toxenv: py38 - tox_extra_args: "-n 4" - - name: Test suite with py39-ubuntu - python: '3.9' - arch: x64 - os: ubuntu-latest - toxenv: py - tox_extra_args: "-n 4" - - name: Test suite with py310-ubuntu - python: '3.10' - arch: x64 - os: ubuntu-latest - toxenv: py - tox_extra_args: "-n 4" - - name: Test suite with py311-ubuntu, mypyc-compiled - python: '3.11' - arch: x64 - os: ubuntu-latest - toxenv: py - tox_extra_args: "-n 4" - test_mypyc: true - - name: Test suite with py312-ubuntu, mypyc-compiled - python: '3.12' + # - name: Test suite with py38-ubuntu, mypyc-compiled + # python: '3.8' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 4" + # test_mypyc: true + # - name: Test suite with py38-windows-64 + # python: '3.8' + # arch: x64 + # os: windows-latest + # toxenv: py38 + # tox_extra_args: "-n 4" + # - name: Test suite with py39-ubuntu + # python: '3.9' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 4" + # - name: Test suite with py310-ubuntu + # python: '3.10' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 4" + # - name: Test suite with py311-ubuntu, mypyc-compiled + # python: '3.11' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 4" + # test_mypyc: true + # - name: Test suite with py312-ubuntu, mypyc-compiled + # python: '3.12' + # arch: x64 + # os: ubuntu-latest + # toxenv: py + # tox_extra_args: "-n 4" + # test_mypyc: true + - name: Test suite with py313-ubuntu, mypyc-compiled + python: '3.13' arch: x64 os: ubuntu-latest toxenv: py tox_extra_args: "-n 4" test_mypyc: true - - name: Test suite with py313-ubuntu, mypyc-compiled + - name: Test suite with py313-windows-64, mypyc-compiled python: '3.13' arch: x64 - os: ubuntu-latest + os: windows-latest toxenv: py tox_extra_args: "-n 4" test_mypyc: true @@ -87,13 +94,13 @@ jobs: # allow_failure: true # test_mypyc: true - - name: mypyc runtime tests with py39-macos - python: '3.9.18' - arch: x64 - # TODO: macos-13 is the last one to support Python 3.9, change it to macos-latest when updating the Python version - os: macos-13 - toxenv: py - tox_extra_args: "-n 3 mypyc/test/test_run.py mypyc/test/test_external.py" + # - name: mypyc runtime tests with py39-macos + # python: '3.9.18' + # arch: x64 + # # TODO: macos-13 is the last one to support Python 3.9, change it to macos-latest when updating the Python version + # os: macos-13 + # toxenv: py + # tox_extra_args: "-n 3 mypyc/test/test_run.py mypyc/test/test_external.py" # This is broken. See # - https://github.com/python/mypy/issues/17819 # - https://github.com/python/mypy/pull/17822 @@ -110,11 +117,11 @@ jobs: arch: x64 os: ubuntu-latest toxenv: type - - name: Type check our own code (py38-windows-64) - python: '3.8' - arch: x64 - os: windows-latest - toxenv: type + # - name: Type check our own code (py38-windows-64) + # python: '3.8' + # arch: x64 + # os: windows-latest + # toxenv: type # We also run these checks with pre-commit in CI, # but it's useful to run them with tox too, @@ -185,16 +192,27 @@ jobs: echo os.sched_getaffinity; python -c 'import os; print(len(getattr(os, "sched_getaffinity", lambda *args: [])(0)))' pip install setuptools==68.2.2 tox==4.11.0 - - name: Compiled with mypyc - if: ${{ matrix.test_mypyc }} + - name: Compiled with mypyc (ubuntu) + if: ${{ matrix.os == 'ubuntu-latest' }} run: | pip install -r test-requirements.txt CC=clang MYPYC_OPT_LEVEL=0 MYPY_USE_MYPYC=1 pip install -e . + - name: Compiled with mypyc (win) + if: ${{ matrix.os == 'windows-latest' }} + env: + MYPYC_OPT_LEVEL: 0 + MYPY_USE_MYPYC: 1 + run: | + pip install -r test-requirements.txt + pip install -e . + - name: Setup tox environment + if: false run: | tox run -e ${{ matrix.toxenv }} --notest - name: Test + if: false run: tox run -e ${{ matrix.toxenv }} --skip-pkg-install -- ${{ matrix.tox_extra_args }} continue-on-error: ${{ matrix.allow_failure == 'true' }}