Mutation testing #11
This file contains hidden or 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
| name: Mutation testing | |
| on: | |
| schedule: | |
| - cron: "17 3 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| dbwriter: | |
| name: DbWriter mutation testing | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 | |
| with: | |
| dotnet-version: | | |
| 8.0.413 | |
| 9.0.301 | |
| - name: Cache NuGet packages | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-mutation-nuget-${{ hashFiles('src/CodeIndex/packages.lock.json', 'tests/CodeIndex.HookIsolationFixture/packages.lock.json', 'tests/CodeIndex.Tests/packages.lock.json', 'tools/CodeIndex.Changelog/packages.lock.json', 'tools/CodeIndex.PackageNormalize/packages.lock.json', 'tools/CodeIndex.TestTelemetry/packages.lock.json') }} | |
| - name: Cache Stryker tool | |
| id: stryker-cache | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ~/.dotnet/tools | |
| key: ${{ runner.os }}-mutation-stryker-4.14.0 | |
| - name: Restore | |
| run: dotnet restore CodeIndex.sln --locked-mode | |
| - name: Install Stryker.NET | |
| if: steps.stryker-cache.outputs.cache-hit != 'true' | |
| run: dotnet tool update --global dotnet-stryker --version 4.14.0 | |
| - name: Run DbWriter mutation tests | |
| run: dotnet stryker --config-file stryker-config.json |