-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
1 parent
c9c416a
commit cd15bca
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |