Conversation
The problem was that we now get a warning when we are missing repo information. That is available in CI but not on localhost. We just fake it.
There was a problem hiding this comment.
Pull request overview
Updates local test execution so repo metadata is available (avoiding the “Repo information will not be reported…” warning) by injecting GitHub-style environment variables when running integration test targets via make.
Changes:
- Add
FAKE_CI_ENVMakefile variable containing GitHub env vars used for repo info detection. - Apply
FAKE_CI_ENVto multipletest_integration*targets when invokinggotestsum.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Fake CI env vars so that tests don't emit "Repo information will not be reported" warnings. | ||
| # These are only used when running tests locally (real CI already sets them). | ||
| FAKE_CI_ENV = GITHUB_RUN_NUMBER=1 GITHUB_SERVER_URL=https://github.com GITHUB_REPOSITORY=kosli-dev/cli GITHUB_REPOSITORY_ID=123456 |
There was a problem hiding this comment.
FAKE_CI_ENV is injected unconditionally into the test targets, so running these targets in GitHub Actions will override the real GITHUB_* values (not just fill them in locally). That conflicts with the comment and can lead to incorrect repo metadata being used during CI runs.
Consider making FAKE_CI_ENV empty when GITHUB_RUN_NUMBER (or another CI marker) is already set, or set per-variable defaults in the recipe (only if unset) so CI-provided values are preserved.
| FAKE_CI_ENV = GITHUB_RUN_NUMBER=1 GITHUB_SERVER_URL=https://github.com GITHUB_REPOSITORY=kosli-dev/cli GITHUB_REPOSITORY_ID=123456 | |
| FAKE_CI_ENV_VARS = GITHUB_RUN_NUMBER=1 GITHUB_SERVER_URL=https://github.com GITHUB_REPOSITORY=kosli-dev/cli GITHUB_REPOSITORY_ID=123456 | |
| FAKE_CI_ENV = $(if $(GITHUB_RUN_NUMBER),,$(FAKE_CI_ENV_VARS)) |
The problem was that we now get a warning when we
are missing repo information. That is available in CI
but not on localhost. We just fake it.