Skip to content

Commit

Permalink
Add aicsimageio test (#77)
Browse files Browse the repository at this point in the history
* wip

* quick try

* add pipe

* move order

* printls

* add nest

* cache

* fix

* break apart

* cd again

* install

* only test on push to master and workflow_dispatch
  • Loading branch information
tlambert03 authored Feb 3, 2021
1 parent c9c416a commit cd15bca
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/scripts/download_aics_test_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from pathlib import Path

from quilt3 import Package


def download_test_resources() -> None:
root = Path(__file__).parent.parent.parent
resources = (root / "aicsimageio" / "aicsimageio" / "tests" / "resources").resolve()
resources.mkdir(exist_ok=True)
package = Package.browse(
"aicsimageio/test_resources", "s3://aics-modeling-packages-test-resources"
)
package["resources"].fetch(resources)


if __name__ == "__main__":
download_test_resources()
49 changes: 49 additions & 0 deletions .github/workflows/test_aics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: test aicsimageio

on:
push:
branches:
- "master"
workflow_dispatch:

jobs:
test:
name: test aicsimageio
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install ome-types
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Clone aicsimageio
run: |
git clone -b main https://github.com/AllenCellModeling/aicsimageio.git
- uses: actions/cache@v2
id: cache
with:
path: aicsimageio/aicsimageio/tests/resources
key: ${{ runner.os }}-${{ hashFiles('.github/scripts/download_aics_test_data.py') }}

- name: Install Test Data
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install quilt3
python .github/scripts/download_aics_test_data.py
- name: Install aicsimageio
run: |
cd aicsimageio
pip install .[test]
- name: Run Tests
run: |
cd aicsimageio
pytest aicsimageio/tests/readers/test_ome_tiff_reader.py -v -k "not REMOTE"

0 comments on commit cd15bca

Please sign in to comment.