Skip to content

Commit

Permalink
merged master
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Werkman committed Sep 1, 2023
2 parents e44bb01 + 2eafd77 commit 9ebf7f7
Show file tree
Hide file tree
Showing 87 changed files with 2,313 additions and 879 deletions.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_when_type_is_apparent = true:warning
csharp_style_var_elsewhere = true:suggestion

csharp_style_namespace_declarations = file_scoped:suggestion

# Default naming styles
dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.severity = suggestion
dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.style = pascal_case_suffixed_with_async
Expand Down
15 changes: 11 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
"config:recommended"
],
"configMigration": true,
"gitAuthor": "Renovatebot <[email protected]>",
Expand All @@ -12,19 +12,26 @@
],
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"matchUpdateTypes": [
"minor",
"patch",
"pin",
"digest"
],
"automerge": true
},
{
"matchDatasources": ["azure-pipelines-tasks"],
"matchDatasources": [
"azure-pipelines-tasks"
],
"extractVersion": "^(?<version>\\d+)"
}
],
"azure-pipelines": {
"enabled": true,
"fileMatch": [
"azure.*pipelines?.*\\.ya?ml$",
"pipeline-templates\/.*\\.ya?ml$"
"pipeline-templates/.*\\.ya?ml$"
]
}
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ While developing on Stryker.NET we advise to work in [the latest Visual Studio](

### Example: Steps to run Stryker.NET on a local project
* Clone the repository `https://github.com/stryker-mutator/stryker-net.git`
* Open `Stryker.CLI.sln`
* Open `Stryker.sln`
* On `Stryker.CLI` open `properties > Debug`
* Create a new Debug profile
* Set `Launch` as `Project`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.6" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2612" />
<PackageReference Include="Xamarin.Essentials" Version="1.8.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.6" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2612" />
<PackageReference Include="Xamarin.Essentials" Version="1.8.0" />
</ItemGroup>
</Project>
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![Nuget](https://img.shields.io/nuget/dt/dotnet-stryker.svg?style=flat-square)](https://www.nuget.org/packages/dotnet-stryker/)
[![Azure DevOps build](https://img.shields.io/azure-devops/build/stryker-mutator/Stryker/4/master.svg?label=Azure%20Pipelines&style=flat-square)](https://dev.azure.com/stryker-mutator/Stryker/_build/latest?definitionId=4)
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/stryker-mutator/506a1f46-900e-434e-805f-ff8d36fc81af/4/master.svg?compact_message&style=flat-square)](https://dev.azure.com/stryker-mutator/Stryker/_build/latest?definitionId=4)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fstryker-mutator%2Fstryker-net%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/stryker-mutator/stryker-net/master)
[![Slack](https://img.shields.io/badge/chat-on%20slack-blueviolet?style=flat-square)](https://join.slack.com/t/stryker-mutator/shared_invite/enQtOTUyMTYyNTg1NDQ0LTU4ODNmZDlmN2I3MmEyMTVhYjZlYmJkOThlNTY3NTM1M2QxYmM5YTM3ODQxYmJjY2YyYzllM2RkMmM1NjNjZjM)

# ![S](https://raw.githubusercontent.com/stryker-mutator/stryker-mutator.github.io/master/images/stryker-80x80.png)tryker.NET
Expand Down Expand Up @@ -37,7 +38,7 @@ For more information read our [getting started](https://stryker-mutator.io/docs/

## Documentation

For the full documentation on how to use Stryker.NET, see our [configuration docs](https://stryker-mutator.io/docs/stryker-net/Configuration).
For the full documentation on how to use Stryker.NET, see our [configuration docs](https://stryker-mutator.io/docs/stryker-net/configuration).

## Migrating

Expand All @@ -49,7 +50,7 @@ For the full list of all available mutations, see the [mutations docs](https://s

## Supported Reporters

For the full list of all available reporters, see the [reporter docs](https://stryker-mutator.io/docs/stryker-net/Reporters).
For the full list of all available reporters, see the [reporter docs](https://stryker-mutator.io/docs/stryker-net/reporters).

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions adding_a_mutator.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A mutator:
2. **Should be fast**: Stryker visits every syntax elements recursively, meaning that each syntax item is visited several times. A slow mutator can seriously slow down the mutation process.
3. **Should generate buildable mutations**.: generated mutations should result in **compilable code in the majority of situations**.
4. **Should generate survivors**: mutators **should avoid** generating **mutations that often raise exceptions** (e.g., changing the sign of an index, such as `array\[i\]` to `array\[-i\]`) are those will be killed by any test that execute these lines.
5. **Should generate killable mutations**: users must be able to devise a test that can kill the mutation. The main risk here is getting_semantically equivalent_ mutations, i.e., mutations that do change the behavior of the code and simply result in an alternate, but correct, implementation.
5. **Should generate killable mutations**: users must be able to devise a test that can kill the mutation. The main risk here is getting _semantically equivalent_ mutations, i.e., mutations that do change the behavior of the code and simply result in an alternate, but correct, implementation.
6. **Should be general**: mutators should be able to generate mutations for all projects, i.e., should not be specific to some rarely used constructions 5or type of projects. **Note**: in the future, Stryker.Net may support extra mutators via a plug-in like mechanism; those could be framework specific.

## How to code a mutator?
Expand Down Expand Up @@ -77,4 +77,4 @@ You need to:

[Back to main contributing document](CONTRIBUTING.md).

[1]: https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/get-started/syntax-analysis "Get started with syntax analysis"
[1]: https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/get-started/syntax-analysis "Get started with syntax analysis"
52 changes: 30 additions & 22 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ pr:
- '.github/*'

variables:
PackageVersion: '3.9.2'
VersionBuildNumber: $[counter('3.9.2', 1)]
PackageVersion: '3.10.0'
VersionBuildNumber: $[counter('3.10.0', 1)]
IntegrationTestVersion: $(PackageVersion)-alpha.$(VersionBuildNumber)
ProjectsToPack: src/Stryker.CLI/Stryker.CLI/Stryker.CLI.csproj
MygetFeed: https://www.myget.org/F/stryker-mutator-integrationtest
AzureArtifactFeedUri: https://pkgs.dev.azure.com/stryker-mutator/Stryker/_packaging/stryker-net/nuget/v3/index.json
MygetFeedUri: https://www.myget.org/F/stryker-mutator-integrationtest/api/v3/index.json
ForkIntegrationNugetFeedUri: https://f.feedz.io/stryker/stryker-net/nuget/index.json
MainIntegrationNugetFeedUri: https://pkgs.dev.azure.com/stryker-mutator/Stryker/_packaging/stryker-net/nuget/v3/index.json
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages
LibManCacheWindows: $(USERPROFILE)/.librarymanager/cache
LibManCacheMacLinux: $(HOME)/.librarymanager/cache
Expand All @@ -43,7 +42,7 @@ stages:

- stage: Analysis
dependsOn: UpdatePackageLockFiles
condition: and(not(failed()), eq(variables['System.PullRequest.IsFork'], 'False'))
condition: and(and(not(failed()), not(canceled())), eq(variables['System.PullRequest.IsFork'], 'False'))
jobs:
- job:
displayName: Run Sonar Analysis
Expand Down Expand Up @@ -74,7 +73,7 @@ stages:
pollingTimeoutSec: '300'
- job: RunStrykerCLI
displayName: Run stryker on Stryker.CLI
condition: eq(variables['Build.Reason'], 'Schedule')
condition: and(succeeded(), eq(variables['Build.Reason'], 'Schedule'))
dependsOn: []
timeoutInMinutes: 240
steps:
Expand All @@ -90,12 +89,11 @@ stages:
arguments: install dotnet-stryker --tool-path $(Agent.BuildDirectory)/tools
includeNuGetOrg: true
- script: $(Agent.BuildDirectory)/tools/dotnet-stryker --reporter dashboard --reporter dots --reporter html --version master --dashboard-api-key $(Stryker.Dashboard.Api.Key)
condition: succeeded()
displayName: Run Stryker on Stryker.CLI
workingDirectory: 'src\Stryker.CLI\Stryker.CLI.UnitTest'
- job: RunStrykerCore
displayName: Run stryker on Stryker.Core
condition: eq(variables['Build.Reason'], 'Schedule')
condition: and(succeeded(), eq(variables['Build.Reason'], 'Schedule'))
dependsOn: []
timeoutInMinutes: 240
steps:
Expand All @@ -111,21 +109,20 @@ stages:
arguments: install dotnet-stryker --tool-path $(Agent.BuildDirectory)/tools
includeNuGetOrg: true
- script: $(Agent.BuildDirectory)/tools/dotnet-stryker --reporter dashboard --reporter dots --reporter html --version master --dashboard-api-key $(Stryker.Dashboard.Api.Key)
condition: succeeded()
displayName: Run Stryker on Stryker.Core
workingDirectory: 'src\Stryker.Core\Stryker.Core.UnitTest'
- task: PublishMutationReport@1
inputs:
reportPattern: 'src/Stryker.Core/Stryker.Core.UnitTest/**/mutation-report.html'

- stage: DeployIntegrationtestPackage
displayName: Deploy Integrationtest Package
- stage: PublishIntegrationtestPackage
displayName: Publish Integrationtest Package
dependsOn: UpdatePackageLockFiles
condition: not(failed())
condition: and(not(failed()), not(canceled()))
jobs:
- deployment: PublishIntegrationTestPackage
displayName: Prepare integrationtest package
environment: 'myget'
environment: 'integrationtest'
strategy:
runOnce:
deploy:
Expand Down Expand Up @@ -154,22 +151,22 @@ stages:
includesymbols: true
- task: DotNetCoreCLI@2
displayName: 'Publish integrationtest packages'
condition: eq(variables['System.PullRequest.IsFork'], 'True')
condition: and(succeeded(), eq(variables['System.PullRequest.IsFork'], 'True'))
inputs:
command: custom
custom: 'nuget'
arguments: 'push *dotnet-stryker*$(IntegrationTestVersion).nupkg -s $(MygetFeed) -k $(IntegrationTestFeedKey)'
arguments: 'push *dotnet-stryker*$(IntegrationTestVersion).nupkg -s $(ForkIntegrationNugetFeedUri) -k $(IntegrationTestFeedKey)'
workingDirectory: '$(Build.ArtifactStagingDirectory)/integrationtest'
- task: DotNetCoreCLI@2
displayName: 'Publish integrationtest packages'
condition: eq(variables['System.PullRequest.IsFork'], 'False')
condition: and(succeeded(), eq(variables['System.PullRequest.IsFork'], 'False'))
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/integrationtest/*$(IntegrationTestVersion).nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '506a1f46-900e-434e-805f-ff8d36fc81af/cc8fa47b-395f-417d-8b3d-72618b95ddb8'
- job: WaitOnMyGetProcessing
displayName: Wait on pre-release packages to be processed on MyGet
- job: WaitOnIntegrationFeedProcessing
displayName: Wait on pre-release packages to be processed on Integration Feed
dependsOn: 'PublishIntegrationTestPackage'
pool: server
steps:
Expand All @@ -180,8 +177,8 @@ stages:
- stage: IntegrationTests
dependsOn:
- Analysis
- DeployIntegrationtestPackage
condition: not(failed())
- PublishIntegrationtestPackage
condition: and(not(failed()), not(canceled()))
jobs:
- job: WindowsTests
displayName: Run tests on Windows
Expand All @@ -205,6 +202,17 @@ stages:
projects: '**/Validation.csproj'
arguments: --filter Category=SingleTestProject

- template: pipeline-templates/run-integration-test-steps.yml
parameters:
testName: 'windows-fsharp'
workingDirectory: 'integrationtest/TargetProjects/Library.FSharp.XUnit'
- task: DotNetCoreCLI@2
displayName: 'Assert integration test results'
inputs:
command: test
projects: '**/Validation.csproj'
arguments: --filter Category=FSharp

- job: LinuxTests
displayName: Run tests on Linux
pool:
Expand Down Expand Up @@ -259,7 +267,7 @@ stages:
dependsOn:
- Analysis
- IntegrationTests
condition: and(not(failed()), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
condition: and(and(not(failed()), not(canceled())), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
jobs:
- job: PublishRelease
displayName: Publish Release Artifacts
Expand Down
Loading

0 comments on commit 9ebf7f7

Please sign in to comment.