Skip to content

Commit 7364125

Browse files
jfesereb8680
andauthored
Split out indexed tests into a separate group (#595)
* split out indexed tests into a separate group * split * break up further * caching * more caching --------- Co-authored-by: Eli <eli@basis.ai>
1 parent fa2e420 commit 7364125

6 files changed

Lines changed: 49 additions & 9 deletions

File tree

.github/workflows/lint.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919
with:
2020
enable-cache: true
2121

22-
- name: Install pandoc
23-
run: |
24-
sudo apt install -y pandoc
22+
- name: Cache virtual environment
23+
uses: actions/cache@v4
24+
with:
25+
path: .venv
26+
key: venv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
2527

2628
- name: Install dependencies
2729
run: |

.github/workflows/test.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,43 @@ jobs:
1414
strategy:
1515
matrix:
1616
python-version: ["'<3.13'", "'3.13'"]
17+
test-group:
18+
- name: indexed
19+
paths: tests/test_handlers_indexed*.py
20+
- name: torch
21+
paths: tests/test_handlers_torch*.py
22+
- name: pyro
23+
paths: tests/test_handlers_pyro*.py
24+
- name: jax
25+
paths: tests/test_handlers_jax*.py
26+
- name: numpyro
27+
paths: tests/test_handlers_numpyro*.py
28+
- name: llm
29+
paths: tests/test_handlers_llm*.py
30+
- name: examples
31+
paths: tests/test_examples_*.py
32+
- name: core
33+
paths: effectful/ tests/test_ops_*.py tests/test_internals_*.py
34+
name: "${{ matrix.test-group.name }} (py ${{ matrix.python-version }})"
1735
steps:
1836
- uses: actions/checkout@v4
19-
37+
2038
- name: Install uv
2139
uses: astral-sh/setup-uv@v5
2240
with:
2341
enable-cache: true
2442

25-
- name: Install pandoc
26-
run: |
27-
sudo apt install -y pandoc
43+
- name: Cache virtual environment
44+
uses: actions/cache@v4
45+
with:
46+
path: .venv
47+
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
2848

2949
- name: Install Python dependencies
3050
run: |
3151
uv sync --all-extras --dev --python ${{ matrix.python-version }}
32-
52+
3353
- name: Run tests
3454
env:
3555
MKL_NUM_THREADS: 1
36-
run: uv run ./scripts/test.sh
56+
run: uv run pytest ${{ matrix.test-group.paths }} -n auto

.github/workflows/test_docs.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ jobs:
2323
run: |
2424
sudo apt install -y pandoc
2525
26+
- name: Cache virtual environment
27+
uses: actions/cache@v4
28+
with:
29+
path: .venv
30+
key: venv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
31+
2632
- name: Install Python dependencies
2733
run: |
2834
uv sync --all-extras --dev

.github/workflows/test_llm.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ jobs:
2222
with:
2323
enable-cache: true
2424

25+
- name: Cache virtual environment
26+
uses: actions/cache@v4
27+
with:
28+
path: .venv
29+
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
30+
2531
- name: Install Python dependencies
2632
run: |
2733
uv sync --all-extras --dev --python ${{ matrix.python-version }}

.github/workflows/test_notebooks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ jobs:
3030
run: |
3131
sudo apt install -y pandoc
3232
33+
- name: Cache virtual environment
34+
uses: actions/cache@v4
35+
with:
36+
path: .venv
37+
key: venv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
38+
3339
- name: Install Python packages
3440
run: |
3541
uv sync --all-extras --dev

0 commit comments

Comments
 (0)