From f9fc7ce0cc42f8b5b666df3b164ae085cdd2772f Mon Sep 17 00:00:00 2001 From: spreka Date: Wed, 8 Nov 2023 15:16:01 +0100 Subject: [PATCH] test yml update for windows model download --- .github/workflows/only_test.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/only_test.yml b/.github/workflows/only_test.yml index d1f5730..5ea1055 100644 --- a/.github/workflows/only_test.yml +++ b/.github/workflows/only_test.yml @@ -59,10 +59,23 @@ jobs: python -m pip install --upgrade pip python -m pip install pytest pytest-cookies tox - - name: Download model + - name: Download model unix working-directory: src + if: | + runner.os == 'Linux' || + runner.os == 'Darwin' run: | - wget -q -O models.zip https://github.com/spreka/annotatorj/releases/download/v0.0.2-model/models.zip && unzip models.zip; + if [[ ! -f napari_annotatorj/models/model_real_weights.h5 ]]; then + wget -q -O models.zip https://github.com/spreka/annotatorj/releases/download/v0.0.2-model/models.zip && unzip models.zip; + fi + + - name: Download model windows + working-directory: src + if: runner.os == 'Windows' + run: | + if not exist "napari_annotatorj/models/model_real_weights.h5" ( + Invoke-WebRequest -uri https://github.com/spreka/annotatorj/releases/download/v0.0.2-model/models.zip -OutFile models.zip && Expand-Archive models.zip -DestinationPath napari_annotatorj/models/ + ) - name: Cache uses: actions/cache@v3