Skip to content

Commit

Permalink
👷 Isolate curator tests (#2304)
Browse files Browse the repository at this point in the history
Signed-off-by: zethson <[email protected]>
  • Loading branch information
Zethson authored Dec 28, 2024
1 parent 6cdbfdf commit ab593cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- "faq"
- "storage"
- "cli"
- "spatial"
- "curator"
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
Expand All @@ -34,12 +34,12 @@ jobs:
id: changes
with:
filters: |
spatial:
curator:
- 'lamindb/curators/**'
- 'tests/core/test_curator.py'
- uses: actions/setup-python@v5
if: ${{ matrix.group != 'spatial' || steps.changes.outputs.spatial == 'true' }}
if: ${{ matrix.group != 'curator' || steps.changes.outputs.curator == 'true' }}
with:
python-version: |
${{ matrix.group == 'storage' && '3.9' ||
Expand Down Expand Up @@ -77,14 +77,14 @@ jobs:
- run: nox -s lint
if: ${{ matrix.group == 'tutorial' }} # choose a fast-running a group
- run: nox -s "install_ci(group='${{ matrix.group }}')"
if: ${{ matrix.group != 'spatial' || steps.changes.outputs.spatial == 'true' }}
if: ${{ matrix.group != 'curator' || steps.changes.outputs.curator == 'true' }}
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- run: nox -s "build(group='${{ matrix.group }}')"
if: ${{ matrix.group != 'spatial' || steps.changes.outputs.spatial == 'true' }}
if: ${{ matrix.group != 'curator' || steps.changes.outputs.curator == 'true' }}

- name: upload coverage
uses: actions/upload-artifact@v4
Expand Down
9 changes: 5 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def install_ci(session, group):
"uv pip install --system --no-deps ./sub/wetlab ./sub/ourprojects",
)
run(session, "uv pip install --system vitessce")
elif group == "spatial":
elif group == "curator":
extras += "zarr,bionty,jupyter"
run(
session,
Expand All @@ -131,6 +131,7 @@ def install_ci(session, group):
session,
"uv pip install --system -U git+https://github.com/scverse/spatialdata.git@refs/pull/806/head",
) # Required to access metadata attrs
run(session, "uv pip install --system tiledbsoma==1.15.0rc3")
elif group == "docs":
extras += "bionty,zarr"
run(
Expand Down Expand Up @@ -184,7 +185,7 @@ def build(session, group):
if group == "unit-core":
run(
session,
f"pytest {coverage_args} -k 'not test_spatialdata_curator' ./tests/core --durations=50",
f"pytest {coverage_args} --ignore=tests/core/test_curator.py ./tests/core --durations=50",
)
elif group == "unit-storage":
run(session, f"pytest {coverage_args} ./tests/storage --durations=50")
Expand All @@ -209,10 +210,10 @@ def build(session, group):
run(session, f"pytest -s {coverage_args} ./docs/faq")
elif group == "storage":
run(session, f"pytest -s {coverage_args} ./docs/storage")
elif group == "spatial":
elif group == "curator":
run(
session,
f"pytest {coverage_args} tests/core/test_curator.py -k test_spatialdata_curator --durations=50",
f"pytest {coverage_args} tests/core/test_curator.py --durations=50",
)
elif group == "cli":
run(session, f"pytest {coverage_args} ./sub/lamin-cli/tests --durations=50")
Expand Down

0 comments on commit ab593cc

Please sign in to comment.