stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.75k stars 176 forks source link

No branch or tag or commit found with given target master #2823

Open skarllot opened 6 months ago

skarllot commented 6 months ago

Describe the bug Stryker is failing since 3.13.1 version.

Logs

[13:24:19 INF] Time Elapsed 00:04:53.5105569
Stryker.NET failed to mutate your project. For more information see the logs 
below:

No branch or tag or commit found with given target master. Please provide a 
different GitDiffTarget.

Full log: https://github.com/skarllot/Expressions/actions/runs/7438496458/job/20237310858#step:7:141

Expected behavior Run without errors.

Desktop (please complete the following information):

Additional context It runs without errors with the since configuration.

Ref: https://github.com/skarllot/Expressions/actions/runs/7438496458/job/20237310858#step:8:168

rouke-broersma commented 6 months ago

@skarllot stryker by default uses the branch called master for the since feature. Your repo does not have a master branch. You should set the target to main instead.

rouke-broersma commented 6 months ago

@skarllot

The reason you didn't hit this issue before is because since was never actually enabled in your repo due to #2706. This was recently fixed which enabled since and caused your pipeline to stop working.

Please let me know if you have any other issues after adding the since compare target.

skarllot commented 6 months ago

Enabling since doesn't make it always run only for changed code?

rouke-broersma commented 6 months ago

Enabling since doesn't make it always run only for changed code?

It does, but there was a bug where since was not enabled implicitly by creating the object in the config file (instead you had to set since.enabled to true). That has now been fixed so now since is actually running on your project. If you read the issue I linked I think it will be more clear what went wrong before.

dupdob commented 5 months ago

I updated the issue tags to reflect this it is not an issue per se, but documentation/error messages could be made more helpful