-
Couldn't load subscription status.
- Fork 1
Setup integration tests #11
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
Conversation
.github/workflows/tests.yml
Outdated
|
|
||
| - name: "Run infection" | ||
| run: | | ||
| git fetch --depth=1 origin ${{ steps.default-branch.outputs.name }} |
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.
I don't get why do you need the default branch and why are you fetching it here. You've already checked out the extension repo to the default branch...
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.
thats how it is documented on the infection website, for git based diffs
https://infection.github.io/guide/command-line-options.html#git-diff-base
which is what we need in the end, because its so slow as is
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.
But here it’s not diff based, no diff related CLI options are passed.
for phpstan-src in the future I’d do a separate job because it will be a lot different
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.
since running a single mutator on simple repositories like phpstan-doctrine already takes 15 minutes, I had the impression that as soon as we add more mutators there is no other way then doing diff based mutations for all repos
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.
Is the duration really 15 minutes times number of mutators?
If you want to do git fetch origin, I'm really missing some diff options in infection execution (like setting the base 100 commits ago).
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.
in our setup worst-case infection runtime is
("number of mutations" * "runtime of test-suite in seconds") + ("number of mutations" * "a few seconds for running phpstan with a primed result cache")
while a single mutator can yield hundreds of mutations (depending on the size of the project or diff)
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.
so for example in phpstan-doctrine we need ~14min to process 17 mutations because the runtime of the test-suite is ~1 minute
(because our test-suite does not contain meta information which infection can use to optimize the phpunit runtime - like #[CoversClass])
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.
Right now 17m is okay, once it gets slower because of more mutators, we can do the last 100 commits on all repos :)
|
interessting that PHPStan needs 17-18 seconds to re-analyze only 6 files |
|
That should be profiled. It's not obvious where that time is spent. |
|
Thank you! |
closes #10