Skip to content

Commit 149c3e7

Browse files
authored
Fix Modal CI (#790)
1 parent 938eaf1 commit 149c3e7

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/modal-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Modal tests
22

33
on:
4-
# schedule:
5-
# # Mon/Wed/Fri at 03:39 UTC, see https://crontab.guru/
6-
# - cron: "39 3 * * 1,3,5"
4+
schedule:
5+
# Mon/Wed/Fri at 03:39 UTC, see https://crontab.guru/
6+
- cron: "39 3 * * 1,3,5"
77
workflow_dispatch:
88

99
concurrency:

cubed/tests/runtime/test_modal.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
import itertools
2+
import uuid
3+
from datetime import datetime
24

35
import pytest
46

57
modal = pytest.importorskip("modal")
68

9+
# import MODAL_EXECUTORS to set up config correctly
10+
from cubed.tests.utils import MODAL_EXECUTORS # isort: skip # noqa: F401
11+
712
import asyncio
813

914
from cubed.runtime.asyncio import async_map_unordered
1015
from cubed.runtime.executors.modal import modal_create_futures_func
1116
from cubed.tests.runtime.utils import check_invocation_counts, deterministic_failure
1217

13-
BASE_PATH = "s3://cubed-unittest/map_unordered"
18+
UNIQUE_DIR_NAME = f"test-{datetime.now().strftime('%Y%m%dT%H%M%S')}-{uuid.uuid4()}"
19+
BASE_PATH = f"s3://cubed-unittest/map_unordered/{UNIQUE_DIR_NAME}"
1420
region = "us-east-1" # S3 region for above bucket
1521

1622
app = modal.App("cubed-test-app", include_source=True)
@@ -23,6 +29,7 @@
2329
"mypy_extensions", # for rechunker
2430
"ndindex",
2531
"networkx",
32+
"psutil",
2633
"pytest-mock", # TODO: only needed for tests
2734
"s3fs",
2835
"tenacity",

0 commit comments

Comments
 (0)