mamba-org / setup-micromamba

GitHub Action to set up micromamba
MIT License
105 stars 16 forks source link

`cache-environment` does not put environment in the `envs` output #145

Open DamianBarabonkovQC opened 1 year ago

DamianBarabonkovQC commented 1 year ago

Problem Description: Whenever using the flag cache-environment=true in the setup-micromamba CI step, the environment that was retrieved from cache is not added to the envs list of micromamba env list --json. This functionality is useful to determine the path of an environment by its name. However, if the environment is not in that list, the resolution fails, despite the environment existing.

Take any setup step with a cache-environment=true then run micromamba env list --json

      - name: Set up Conda env
        uses: mamba-org/setup-micromamba@5d5dbebd87f7b9358c403c7a66651fa92b310105
        with:
          cache-environment: true
          environment-file: environment.yml
    - name: List the installed envs
      run: |
        micromamba env list --json
      shell: bash -leo pipefail {0}