Skip to content

Commit

Permalink
CI for notebooks (#174)
Browse files Browse the repository at this point in the history
* Update example notebooks to write under examples/data/

* Update example notebooks for TileDB-Cloud

* Run notebook examples on CI Github action

* Set num_workers based on available #cores in example notebooks
  • Loading branch information
gsakkis authored Aug 16, 2022
1 parent 9ae80a4 commit 2dbdac7
Show file tree
Hide file tree
Showing 11 changed files with 1,121 additions and 1,005 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -48,6 +45,16 @@ jobs:
mypyenv/bin/mypy .
rm -rf mypyenv
- name: Run notebook examples
if: ${{ github.ref == 'refs/heads/master' }}
run: |
pip install pytest-xdist nbmake matplotlib torchvision idx2numpy
pytest --disable-warnings --nbmake examples/{models,readers}
# Run tiledb-cloud in parallel
if [[ "${{ secrets.TILEDB_API_TOKEN }}" != "" ]]; then
TILEDB_API_TOKEN="${{ secrets.TILEDB_API_TOKEN }}" pytest --disable-warnings --nbmake -n3 examples/cloud
fi
- name: Run tests
if: ${{ !fromJSON(env.run_coverage) }}
run: pytest --disable-warnings tests/
Expand Down
Loading

0 comments on commit 2dbdac7

Please sign in to comment.