-
Notifications
You must be signed in to change notification settings - Fork 6
Description
In my Python projects, I often build dists early in CI and then let my following/testing jobs rely on the pre-built artifacts. So I'm testing the project by unpacking sdist instead of reaching into Git. This means that the respective jobs don't have a Git repo present.
This makes codspeed upload fail:
Error: Error: Failed to open repository at path: /home/runner/work/yarl/yarl/
Error: Error: could not find repository at '/home/runner/work/yarl/yarl/'; class=Repository (6); code=NotFound (-3)
Error: Process completed with exit code 1.
(https://github.com/aio-libs/yarl/actions/runs/18823934804/job/53703920011?pr=1587#step:10:431)
This is clearly coming from https://github.com/CodSpeedHQ/runner/blob/05f678778b169770e0355f3243162472cd7f676b/src/run/run_environment/provider.rs#L21. Many other integrations (like Codecov) don't have such a pre-requisite and are perfectly happy with the env vars that GitHub sets (https://docs.github.com/en/actions/reference/workflows-and-actions/variables#default-environment-variables) and I think Codspeed should do the same. Demanding a Git repo is an artificial limitation that is sometimes in conflict with what a project's testing environment requires.