Skip to content

Commit

Permalink
Set the split algorithm.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois committed Sep 14, 2024
1 parent 040e9fe commit 23368d7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
# N.B.: The name of this job key (linux-tests) is depended on by scrips/build_cache_image.py. In
# particular, the tox-env matrix list is used to ensure the cache covers all Linux CI jobs.
linux-tests:
name: ./dtox.sh -e ${{ matrix.tox-env }}
name: ./dtox.sh -e ${{ matrix.tox-env }} ${{ matrix.pex-test-pos-args }}
needs: org-check
runs-on: ubuntu-22.04
strategy:
Expand Down Expand Up @@ -101,10 +101,9 @@ jobs:
- tox-env: py312-pip24_2-integration
pex-test-pos-args: --shard 2/2

# N.B.: pytest-split is currently broken under Python 3.13 - its
# `pytest_split.algorithms.Algorithms` enum is somehow empty at runtime.
- tox-env: py313-pip24_2-integration
pex-test-pos-args: --shard 1/2
- tox-env: py313-pip24_2-integration
pex-test-pos-args: --shard 2/2

- tox-env: pypy310-pip24_2-integration
pex-test-pos-args: --shard 1/2
Expand Down Expand Up @@ -144,7 +143,7 @@ jobs:
./dtox.sh -e ${{ matrix.tox-env }} -- \
${{ env._PEX_TEST_POS_ARGS }} ${{ matrix.pex-test-pos-args }}
mac-tests:
name: tox -e ${{ matrix.tox-env }}
name: tox -e ${{ matrix.tox-env }} ${{ matrix.pex-test-pos-args }}
needs: org-check
runs-on: macos-13
strategy:
Expand Down
10 changes: 9 additions & 1 deletion testing/bin/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,16 @@ def main():
if options.it:
args.append("tests/integration")
if options.save_timings:
args.extend(["--store-durations", "--splitting-algorithm", "least_duration"])
args.extend(
[
"--store-durations",
"--clean-durations",
"--splitting-algorithm",
"least_duration",
]
)
elif options.shard:
args.extend(["--splitting-algorithm", "least_duration"])
args.extend(options.shard.iter_pytest_split_args())
else:
args.extend(["tests", "--ignore", "tests/integration"])
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ deps =
pexpect==4.9.0
pytest==4.6.11; python_version < "3.6"
pytest==6.2.5; python_version == "3.6"
pytest==7.4.0; python_version >= "3.7"
pytest==7.4.4; python_version == "3.7"
pytest==8.3.3; python_version >= "3.8"
py{27,py27}: mock==3.0.5
subprocess: subprocess32
passenv =
Expand Down

0 comments on commit 23368d7

Please sign in to comment.