Skip to content

Commit

Permalink
Add mutation testing to feature branches
Browse files Browse the repository at this point in the history
Closes #502
  • Loading branch information
baynezy committed Dec 19, 2024
1 parent 1c75c50 commit 22a4bfe
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/branch-feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,11 @@ jobs:
check-markdown:
needs: [get-version]
uses: ./.github/workflows/step-check-markdown.yml
secrets: inherit
secrets: inherit

mutation-testing:
needs: [get-version]
uses: ./.github/workflows/step-mutation-testing.yml
secrets: inherit
with:
comparison: ${{ github.base_ref }}
26 changes: 26 additions & 0 deletions .github/workflows/step-mutation-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
workflow_call:
inputs:
comparison:
type: string
description: 'The comparison to use for the mutation testing'
required: true
env:
MAJOR_DOTNET_VERSION: 8

jobs:
mutation-testing:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.MAJOR_DOTNET_VERSION }}.0.x
- name: Install Stryker
run: |
dotnet tool install -g dotnet-stryker
- name: Run Stryker
run: |
dotnet stryker --since:${{ inputs.comparison }}
32 changes: 32 additions & 0 deletions stryker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"stryker-config":
{
"solution": "Html2Markdown.sln",
"project": "Html2Markdown.csproj",
"thresholds": {
"high": 95,
"low": 85,
"break": 80
},
"since": {
"target": "develop",
"ignore-changes-in": [
"**.md",
"/.cm/**",
"/.github/**",
"/.git/**",
"/.idea/**",
"/.StrykerOutput/**",
".gitignore",
".gitmessage",
"build.cake",
"markdownlint.json",
"doxygen.config",
"*.DotSettings",
"*.DotSettings.user",
"License.txt",
"semver.json"
]
}
}
}

0 comments on commit 22a4bfe

Please sign in to comment.