coverallsapp / github-action

Coveralls Github Action
https://coveralls.io
MIT License
458 stars 76 forks source link

coveralls still considering old paths after using `source` setting #129

Closed Panaetius closed 2 years ago

Panaetius commented 2 years ago

We gather parllel coveralls data in multiple Github Actions jobs. Since some of the tests shell out to test our CLI application, we have some code in <job-root>/renku and some in <python-dir>/site-packages/renku.

To consolidate those paths, we add this to pyproject.toml

[tool.coverage.paths]
          source = [
              "renku/",
              " /opt/hostedtoolcache/Python/3.8.13/x64/lib/python3.8/site-packages/renku/"
         ]

specifically with a step like this in the actions

- name: Set coveralls path mapping
        run: |
          echo "

          [tool.coverage.paths]
          source = [
              \"renku/\",
              \"$(python -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')/renku/\"
          ]" >> pyproject.toml

That sort of works. Where coverage before was something like image now it's image

But coveralls still considers those 0.0% and shows the overall coverage as 29% (down from 43% before), even though it should be 86.78%

Is there some way to have coveralls not consider the /opt/... paths and just use the consolidated code?

Panaetius commented 2 years ago

Closing in favor of https://github.com/lemurheavy/coveralls-public/issues/1650