Skip to content

Commit ca4e020

Browse files
authored
Halve CI runtime! (#5074)
1 parent 50fd3ff commit ca4e020

File tree

8 files changed

+18
-3
lines changed

8 files changed

+18
-3
lines changed

.github/workflows/tests.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
matrix:
1919
os: [ubuntu-latest, windows-latest, macos-latest]
2020
python-version: ["3.7", "3.8", "3.9"]
21+
# Cherry-pick test modules to split the overall runtime roughly in half
22+
partition: [ci1, not ci1]
2123

2224
# Uncomment to stress-test the test suite for random failures.
2325
# Must also change env.TEST_ID below.
@@ -113,7 +115,7 @@ jobs:
113115
fi
114116
source continuous_integration/scripts/set_ulimit.sh
115117
116-
pytest distributed -m "not avoid_ci" --runslow \
118+
pytest distributed -m "not avoid_ci and ${{ matrix.partition }}" --runslow \
117119
--junitxml reports/pytest.xml -o junit_suite_name=$TEST_ID
118120
119121
# - name: Debug with tmate on failure

distributed/tests/test_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@
9595
wait_for,
9696
)
9797

98+
pytestmark = pytest.mark.ci1
99+
98100

99101
@gen_cluster(client=True)
100102
async def test_submit(c, s, a, b):

distributed/tests/test_failed_workers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
slowinc,
2727
)
2828

29+
pytestmark = pytest.mark.ci1
30+
2931

3032
def test_submit_after_failed_worker_sync(loop):
3133
with cluster() as (s, [a, b]):

distributed/tests/test_nanny.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
from distributed.utils import TimeoutError, parse_ports, tmpfile
2727
from distributed.utils_test import captured_logger, gen_cluster, gen_test, inc
2828

29+
pytestmark = pytest.mark.ci1
30+
2931

3032
# FIXME why does this leave behind unclosed Comm objects?
3133
@gen_cluster(nthreads=[], allow_unclosed=True)

distributed/tests/test_scheduler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
else:
5454
import pickle
5555

56+
pytestmark = pytest.mark.ci1
57+
5658

5759
alice = "alice:1234"
5860
bob = "bob:1234"

distributed/tests/test_steal.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
slowinc,
2929
)
3030

31+
pytestmark = pytest.mark.ci1
32+
3133
# Most tests here are timing-dependent
3234
setup_module = nodebug_setup_module
3335
teardown_module = nodebug_teardown_module

distributed/tests/test_worker.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
)
5252
from distributed.worker import Worker, error_message, logger, parse_memory_limit
5353

54+
pytestmark = pytest.mark.ci1
55+
5456

5557
@pytest.mark.asyncio
5658
async def test_worker_nthreads(cleanup):

setup.cfg

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ filterwarnings =
4747
error:Since distributed.*:PendingDeprecationWarning
4848
minversion = 4
4949
markers =
50-
slow: marks tests as slow (deselect with '-m "not slow"')
51-
avoid_ci: marks tests as flaky on CI on all OSs
50+
ci1: marks tests as belonging to 1 out of 2 partitions to run on CI ('-m "not ci1"' for second partition)
51+
slow: marks tests as slow (deselected by default; select with '--runslow')
52+
avoid_ci: marks tests as flaky or broken on CI on all OSs
5253
ipython: marks tests as exercising IPython
5354
gpu: marks tests we want to run on GPUs
5455

0 commit comments

Comments
 (0)