Converting to mamba #36
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
name: Tests MacOS | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- dev | |
- master | |
- dev_graph | |
push: | |
branches: | |
- dev | |
- master | |
- dev_graph | |
jobs: | |
build: | |
name: Build (${{ matrix.os }}, Python ${{ matrix.python-version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest] | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install openslide | |
shell: bash -l {0} | |
run: brew install openslide | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-version: '1.5.6-0' | |
environment-name: pathml | |
environment-file: requirements/environment_mac.yml | |
init-shell: >- | |
bash | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Install python-javabridge | |
shell: bash -l {0} | |
# run: pip install --use-pep517 numpy==1.23.5 python-javabridge==4.0.3 | |
# run: pip install python-javabridge==4.0.3 | |
run: pip install git+https://github.com/LeeKamentsky/python-javabridge | |
- name: Install python-bioformats | |
shell: bash -l {0} | |
run: pip install python-bioformats==4.0.7 | |
- name: Micromamba info | |
shell: bash -l {0} | |
run: | | |
micromamba info | |
micromamba config | |
micromamba list | |
- name: Set default Temurin JDK 17 | |
run: | | |
sudo update-java-alternatives --set temurin-17-jdk-amd64 || true | |
java -version | |
- name: Install PathML | |
shell: bash -l {0} | |
run: pip install -e . | |
- name: Install torchvision | |
shell: bash -l {0} | |
run: pip install torchvision==0.14.1 | |
- name: Test other modules with pytest and generate coverage | |
shell: bash -l {0} | |
run: | | |
COVERAGE_FILE=.coverage_others coverage run -m pytest -m "not slow and not exclude" | |
- name: Test tile_stitcher with pytest and generate coverage | |
shell: bash -l {0} | |
run: | | |
COVERAGE_FILE=.coverage_tilestitcher coverage run -m pytest tests/preprocessing_tests/test_tilestitcher.py |