Skip to content

Commit

Permalink
Run more tests in parallel (python#17185)
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja authored May 1, 2024
1 parent cd895ce commit fb31409
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,39 @@ jobs:
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2"
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 2"
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 2"
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 2"
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 2"
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 2"
tox_extra_args: "-n 4"
test_mypyc: true

- name: mypyc runtime tests with py39-macos
Expand All @@ -77,13 +77,13 @@ jobs:
# 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 2 mypyc/test/test_run.py mypyc/test/test_external.py"
tox_extra_args: "-n 3 mypyc/test/test_run.py mypyc/test/test_external.py"
- name: mypyc runtime tests with py38-debug-build-ubuntu
python: '3.8.17'
arch: x64
os: ubuntu-latest
toxenv: py
tox_extra_args: "-n 2 mypyc/test/test_run.py mypyc/test/test_external.py"
tox_extra_args: "-n 4 mypyc/test/test_run.py mypyc/test/test_external.py"
debug_build: true

- name: Type check our own code (py38-ubuntu)
Expand Down Expand Up @@ -141,7 +141,9 @@ jobs:
pip install -r test-requirements.txt
CC=clang MYPYC_OPT_LEVEL=0 MYPY_USE_MYPYC=1 pip install -e .
- name: Setup tox environment
run: tox run -e ${{ matrix.toxenv }} --notest
run: |
tox run -e ${{ matrix.toxenv }} --notest
python -c 'import os; print("os.cpu_count", os.cpu_count(), "os.sched_getaffinity", len(getattr(os, "sched_getaffinity", lambda *args: [])(0)))'
- name: Test
run: tox run -e ${{ matrix.toxenv }} --skip-pkg-install -- ${{ matrix.tox_extra_args }}

Expand Down Expand Up @@ -190,4 +192,4 @@ jobs:
- name: Setup tox environment
run: tox run -e py --notest
- name: Test
run: tox run -e py --skip-pkg-install -- -n 2 mypyc/test/
run: tox run -e py --skip-pkg-install -- -n 4 mypyc/test/

0 comments on commit fb31409

Please sign in to comment.