From d3c5d145a477360f4d677fde447d44d2b0af04ba Mon Sep 17 00:00:00 2001 From: weiglszonja Date: Wed, 5 Jun 2024 14:26:28 +0200 Subject: [PATCH] try activate conda env in every step --- .github/workflows/run-bioformats-tests.yml | 23 ++++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/run-bioformats-tests.yml b/.github/workflows/run-bioformats-tests.yml index a16afe78..8a09b6d7 100644 --- a/.github/workflows/run-bioformats-tests.yml +++ b/.github/workflows/run-bioformats-tests.yml @@ -11,6 +11,9 @@ jobs: test: runs-on: ubuntu-latest + env: + CONDA_ENV: test + steps: - uses: actions/checkout@v4 - run: git fetch --prune --unshallow --tags @@ -21,14 +24,9 @@ jobs: auto-activate-base: false python-version: 3.9 - - name: Activate conda environment - run: echo "conda activate test" >> $GITHUB_ENV - - name: Global Setup - env: - CONDA_PREFIX: test run: | - source activate $CONDA_PREFIX + conda activate $CONDA_ENV pip install -U pip pip install pytest-xdist git config --global user.email "CI@example.com" @@ -36,23 +34,20 @@ jobs: pip install wheel==0.41.2 # needed for scanimage - name: Install full requirements - env: - CONDA_PREFIX: test run: | - source activate $CONDA_PREFIX + conda activate $CONDA_ENV pip install .[test] pip install -e .[full] - name: Install BioFormats requirements - env: - CONDA_PREFIX: test run: | - source activate $CONDA_PREFIX + conda activate $CONDA_ENV pip install aicsimageio>=4.14.0 conda install -c conda-forge bioformats_jar - name: Set JAVA_HOME run: | + conda activate $CONDA_ENV if [ -z "${JAVA_HOME}" ]; then echo "JAVA_HOME=$CONDA_PREFIX" >> $GITHUB_ENV fi @@ -69,8 +64,6 @@ jobs: key: ophys-datasets-042023-${{ runner.os }}-${{ steps.ophys.outputs.HASH_OPHYS_DATASET }} - name: Run BioFormats tests - env: - CONDA_PREFIX: test run: | - source activate $CONDA_PREFIX + conda activate $CONDA_ENV pytest tests/test_cxdimagingextractor.py -n auto --dist loadscope