1

I am building a GitHub action that uses coveralls to report the coverage. It worked perfectly until I have specified the GitHub environment and used conda-incubator/setup-miniconda@v2 to add and test some conda dependencies.

I used the following block to run the test and call coveralls:

      - name: Test with pytest
        run: |
          pytest test/ --cov=MyPAckage --cov-config=.coveragerc --cov-report xml:coverage.xml

      - name: Coveralls
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          path-to-lcov: coverage.xml
        run: |
          coveralls --service=github

But now it raises the following error:

/home/runner/work/_temp/0016e5f4-2dac-4c62-95de-bdd966f80476.sh: line 3: coveralls: command not found
Error: Process completed with exit code 127.

So I assume I messed up something with the environment and coveralls is not defined anymore.

I tried adding:

          conda install -c conda-forge coveralls
          alias coveralls='$CONDA/bin/coveralls'

with no success.

Here some links:

Original working version: script (passing)

Version with conda introduced: script failed action

Version with coveralls installation and alias added: script failed action

I have also tried moving the coveralls step only to a different job of the action, but I fell into this github issue, that causes my second job to be queued for forever, so I can't know if it worked or not.

0 Answers0