-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve tests by making them immune to mutations * Introduce mutations testing pipeline * Add mutation badge
- Loading branch information
1 parent
144dbd1
commit fb27821
Showing
18 changed files
with
267 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: test-mutations | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "master" # Run the workflow when pushing to the master branch | ||
paths-ignore: | ||
- "**.md" | ||
- "**.png" | ||
pull_request: | ||
branches: | ||
- "*" # Run the workflow for all pull requests | ||
paths-ignore: | ||
- "**.md" | ||
- "**.png" | ||
|
||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
Configuration: Release | ||
StrongNameKeyName: key.snk | ||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
jobs: | ||
init: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 📥 checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: 🖊️ materialize signing key | ||
id: signing-key | ||
run: | | ||
$path = [IO.Path]::Combine("${{ github.workspace }}","src","${{ env.StrongNameKeyName }}") | ||
[IO.File]::WriteAllBytes($path, [Convert]::FromBase64String("$env:StrongNameKey")) | ||
"PATH=$path" >> $env:GITHUB_OUTPUT | ||
env: | ||
StrongNameKey: ${{ secrets.SIGNING_KEY }} | ||
- name: 💾 install stryker.net | ||
run: | | ||
dotnet new tool-manifest | ||
dotnet tool install --local dotnet-stryker | ||
- name: 👾 test mutations | ||
working-directory: ./src | ||
run: | | ||
dotnet tool run dotnet-stryker -f stryker-config.yaml -r dashboard -v ${{ github.ref_name }} --dashboard-api-key ${{ secrets.STRYKER_API_KEY }} -V debug | ||
env: | ||
CI: true | ||
StrongNameKey: ${{ secrets.SIGNING_KEY }} | ||
StrongNameKeyPath: ${{ steps.signing-key.outputs.PATH }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests/IFakeObjectUnderTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests | ||
{ | ||
public interface IFakeObjectUnderTest | ||
{ | ||
public string StringProperty { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/Objectivity.AutoFixture.XUnit2.AutoMoq.Tests/IFakeObjectUnderTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Objectivity.AutoFixture.XUnit2.AutoMoq.Tests | ||
{ | ||
public interface IFakeObjectUnderTest | ||
{ | ||
public string StringProperty { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests/IFakeObjectUnderTest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests | ||
{ | ||
public interface IFakeObjectUnderTest | ||
{ | ||
public string StringProperty { get; set; } | ||
} | ||
} |
Oops, something went wrong.