Skip to content

Stryker

Stryker #8

Workflow file for this run

name: Stryker
on:
workflow_dispatch:
inputs:
dotnet_version:
description: 'dotnet version'
required: true
type: string
solution_path:
description: 'solution path'
required: true
type: string
workflow_call:
inputs:
dotnet_version:
required: true
type: string
solution_path:
required: true
type: string
jobs:
stryker:
name: Mutation testing
runs-on: ubuntu-latest
steps:
- name: Set default values
id: default_values
run: |
DOTNET_VERSION=${{ github.event.inputs.dotnet_version }}
SOLUTION_PATH=${{ github.event.inputs.solution_path }}
echo "dotnet_version=${DOTNET_VERSION:-"8.0.x"}" >> "$GITHUB_OUTPUT"
echo "solution_path=${SOLUTION_PATH:-"./Zus.sln"}" >> "$GITHUB_OUTPUT"
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ steps.default_values.outputs.dotnet_version }}
- name: Stryker mutator
id: stryker
run: |
export PATH="$PATH:$HOME/.dotnet/tools"
dotnet tool install -g dotnet-stryker
dotnet stryker -O ./reports
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: page
path: ${{ github.workspace }}/reports
- name: Create Awesome Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 9f0cbbbaf1e2c85744909ca282bdf21c
filename: stryker.json
label: mutation score
message: 12.30 %
color: orange
deploy-report:
name: Deploy github pages
needs: stryker
if: ${{ always() && contains(join(needs.*.result, ','), 'success') }}.
uses: ./.github/workflows/gh-pages.yml
secrets: inherit