CodSpeedHQ / action

Github Actions for running CodSpeed in your CI
https://codspeed.io
MIT License
24 stars 3 forks source link

Support for custom shells (specifically, for conda env support) #65

Open tlambert03 opened 1 year ago

tlambert03 commented 1 year ago

I have a project that requires dependencies from conda. As such, I use the setup-miniconda action to create a conda environment and install dependencies.

Unfortunately, that requires specifying the shell to github in order to activate the conda environment:

      - name: Do something
        shell: bash -el {0}
        run: conda info

as far as I can tell however, @actions/exec doesn't support a shell parameter, so the invocation in run.ts here doesn't respect it:

https://github.com/CodSpeedHQ/action/blob/17c9f2c732106691874eaa8b6f8a7aabedba7ff4/src/run.ts#L73

A similar issue came up in another action recently, and a proposed solution is here: https://github.com/aganders3/headless-gui/pull/5

would be great to support a similar shell input here so that we can use this with conda environments

thanks!

art049 commented 1 year ago

Yes, I think it would make complete sense.

As a workaround, maybe something like this could work:

- uses: CodSpeedHQ/action@v1
  run: bash -el -c "conda info"

I'm not sure about the exact command you need to run but it should work with the expected context.