New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use CI variables to detect project path #1949
feat: use CI variables to detect project path #1949
Conversation
ea209db
to
69178f9
Compare
All green @maks-rafalko :D |
69178f9
to
b0a8e3c
Compare
Thanks for the review. All ready @sanmai :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, when I read the Github docs, they should both resolve to the same directory. But I have no practical experience. |
…m:darthf1/infection into feat/use-ci-variables-detect-project-path
Could you please also merge |
Comments addressed; all green. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sill 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 💯
Thank you @darthf1 |
Fixes #1948.
This fixes the following issue on Gitlab CI:
By utilizing the
CI_PROJECT_DIR
(Gitlab) and theGITHUB_WORKSPACE
(Github) ENV variables to get the project root dir, thegit
command does not have to be invoked.This does not resolve the issue with running Infection with one of these loggers both outside the CI and outside a GIT repository, but since my project is in a mono-repo and the pathmapping is different inside my Docker container, and the value of these loggers is inside a CI environment; I'm happy with this change.
I tested this change in a CI runner in my private Gitlab project. I have not tested this in CI runner in a Github project, as I don't have any. But the change seems pretty straight forward.