Skip to content

[FR] Make local Git repo optional #144

@webknjaz

Description

@webknjaz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions