Skip to content

Backwards compatibility renaming #765

Backwards compatibility renaming

Backwards compatibility renaming #765

Workflow file for this run

name: TileDB-BioImaging CI
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false
defaults:
run:
shell: bash -l {0}
env:
run_coverage: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v2
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-name: test
cache-downloads: true
create-args: >-
python=3.7
pre-commit
pytest-cov
pytest-mock
- name: Install openslide for non-Win
run: micromamba install openslide
if: matrix.os != 'windows-latest'
- name: Install openslide for Win
run: |
choco install wget --no-progress
wget https://github.com/openslide/openslide-winbuild/releases/download/v20221217/openslide-win64-20221217.zip
unzip ./openslide-win64-20221217.zip -d /usr/local/
mv /usr/local/openslide-win64-20221217/* /usr/local/
if: matrix.os == 'windows-latest'
- name: Run pre-commit hooks
run: pre-commit run -a
- name: Install package
run: |
pip install tifffile@git+https://github.com/TileDB-Inc/tifffile.git@gsa/python-3.7
pip install -e .[full]
- name: Run tests with coverage
id: stats
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
# This GITHUB_WORKSPACE is bydefault set to D: driver whereas pytest's tmp_dir
# default is C: ,thus we create a temp_test folder for pytest's tmp_dir to run on D: as well
if [ "$RUNNER_OS" == "Linux" ]; then
pytest -v --cov=tiledb --cov-report=term-missing --durations=0 tests/ > coverage.txt
cat coverage.txt
TEST_COVERAGE="$(grep '^TOTAL' coverage.txt | awk -v N=4 '{print $N}')"
echo "COVERAGE=$TEST_COVERAGE" >> $GITHUB_OUTPUT
else
mkdir test_temp
pytest --basetemp=test_temp -v --cov=tiledb --cov-report=term-missing --durations=0 tests/
fi
- name: Run notebook examples
run: |
pip install opencv-python-headless matplotlib nbmake
pytest --nbmake examples
- name: Create Test Coverage Badge
if: ${{ fromJSON(env.run_coverage) && matrix.os == 'ubuntu-latest'}}
uses: schneegans/dynamic-badges-action@v1.1.0
with:
auth: ${{ secrets.COVERAGE_SECRET }}
gistID: 32d48185733a4e7375e80e3e35fab452
filename: gist_bioimg.json
label: Test Coverage
message: ${{ steps.stats.outputs.COVERAGE }}
color: green
namedLogo: pytest