infection: PrettyCI failure
I’m opening this issue because I noticed the PrettyCI build is failing. However running pretty (or php-cs-fixer fix --dry-run) locally yields no error.
I think I’ve spotted the root of the problem: the tests/ directory is excluded from the generated archive. But when running a build on PrettyCI I download the archive instead of cloning the repository as it is much master (no git history has to be downloaded). Since the GitHub archive doesn’t contain the tests/ directory the build is now failing.
I’m not 100% certain what to do you yet: using git clone is way slower. I’ll try it out in the coming days and see what’s the best solution. I’ll keep you posted here.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 16 (7 by maintainers)
I remember now why I didn’t go this way: GitHub did not support shallow clone for single commits (https://stackoverflow.com/a/43136160/245552). However I just tried again and it worked! Here is what I did:
I tried using Symfony as a reference (because it’s a large repository with a great number of commits):
So that sounds definitely like a good solution! Now I need to verify that it works with tokens for private repositories. Thanks for the help I’ll keep you posted!
Maybe even do a shallow clone? Should be the fastest, I think.
Also a shallow clone ( i think that is what its called), where you don’t clone the branch, but just the latest version of it. Should also be a bit faster, especially for older, longer running projects.